-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPointers.c
More file actions
68 lines (57 loc) · 1.07 KB
/
Pointers.c
File metadata and controls
68 lines (57 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#include<stdio.h>
/*
int main(){
int age = 22;
int *ptr = &age;
int _age=*ptr;
printf("%d",_age);
return 0;
}*/
/*
int main(){
int age = 22;
int *ptr = &age;
//Printing address through pointer
//printf("%p \n",&age);
printf("%u \n",&age);
// through ptr
//printf("%p \n",ptr);
printf("%u \n",ptr);
//Printing address of ptr
printf("%p \n",&ptr);
printf("%u \n",&ptr);
return 0;
}*/
/*
int main(){
int age = 20;
int *ptr=&age;
//Printing value of Pointer
printf("%d \n",age);
printf("%d\n",*ptr);
printf("%d\n",*(&age));
}*/
/*
int main(){
int x,*ptr;
ptr=&x;
*ptr = 0;
printf(" x = %d \n",x);
printf("*ptr = %d \n",*ptr);
*ptr += 5;
printf(" x = %d \n",x);
printf("*ptr = %d \n",*ptr);
(*ptr)++ ;
printf(" x = %d \n",x);
printf("*ptr = %d \n",*ptr);
return 0;
}*/
//POINTER TO POINTER
int main(){
float price = 220.00;
float *ptr=&price;
float **pptr =&ptr;
printf("%u \n",ptr);
printf("%u \n",pptr);
return 0;
}