








































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An in-depth explanation of pointers in c programming, including pointer declaration, initialization, assignment, assigning values, seeing the value of a pointer, pointer examples, arrays, assigning addresses to pointers, and pointer arithmetic. It also covers using pointers and modifying behavior in argument passing.
Typology: Slides
1 / 48
This page cannot be seen from the preview
Don't miss anything!









































MainMemory(RAM)
ControlUnit (CU)Arithmetic-Logic Unit(ALU)CPU
0 - 34 - 7 100 -107108 -109 110 -121^ MemoryAddresses
instr1instr2.^.^. -75^254
... 101.
program^ data
char *c; (pointer to char, not assigned)int b = 5; int *bptr = &b;char str[8]; char *s = str;
bptr
b s str[0]
str[7] 5
First entry has index 0
int i = 0;int intPtr = NULL; i*^
intPtr 0x
0x
0x
0x
int i = 0;
int i = 0;int intPtr = NULL;intPtr = &i; i*^
intPtr
0x
0x
0x
i^
intPtr 0x
0x
0x
0x
What do these expressions evaluate to? &i intPtrintPtri &intPtr*
0x i^
intPtr
0x
0x
0x
What do these expressions evaluate to? &i^
0x
intPtrintPtri &intPtr*