Save
COMPUTER SCIENCE
Save
Share
Learn
Content
Leaderboard
Learn
Created by
Elsa Mary
Visit profile
Subdecks (1)
structures and pointers
COMPUTER SCIENCE
35 cards
Cards (44)
* (Dereference Operator)
Accesses the value stored at the
memory
address pointed to by a
pointer.
& (Address-of Operator)
Returns the
memory address
of a variable.
Dereferencing a pointer
`
*ptr
`
Initializing a pointer
`int
*ptr
= &x;`
Pointer
declaration
`int
*ptr
;`
Pointer
A variable that stores the
memory address
of another variable.
Accessing structure members
Using the
dot
(.)
operator
Struct declaration
`struct student { int roll; char name[20]; };`
Structure
A collection of variables of different data types stored in
contiguous
memory locations.
See all 44 cards