Professional Documents
Culture Documents
UNIT#3 Pointers: by Abhishek Verma
UNIT#3 Pointers: by Abhishek Verma
POINTERS
By Abhishek Verma
Outline
Features of pointers
Pointer declaration
Pointers and arrays
Pointers and strings
Features of pointers
Topics discussed in this section
Pointer Constants
Pointer Values
Pointer Variables
Accessing Variables Through Pointers
Pointer
Note
Note
int a;
Address of a = &a
Value at address (&a) = *(&a)
Address and Indirection Operators
Inverse
& *
Character Constants and variables
‘G’ Starting
‘X’ Value address
.
.
‘a’
‘g’
‘z’ System
Memory
(RAM)
Pointer Constants
‘\n’ Variable
Character 00000
. name
Constants .
.
14645
.
aChar 14650 14650
‘A’ A
14653
‘G’
.
‘X’
Starting .
.
address .
.
.
‘a’
1048575
‘g’
‘z’ System
Memory
(RAM)
Pointer Constants
Note
Note
Note
Integer . Variable
Constants . name
.
. aInt 14650
-123 -123
14654 Starting
-122
. 14658 address
bInt 151
. 14662
.
151
152
. System
Memory
(RAM)
Pointer Variable
aInt -123
aInt -123 14650
ptr_a
ptr_a 14650
Pointer
variable