1 #include <stdio.h>
2
3 int main()
4 {
5 int data = 0;
6 int *ptr = &data;
7
8 printf("ptr = %x/n", ptr);
9 printf("*ptr = %x/n", *ptr);
10 printf("*(*ptr) = %x/n", *(*ptr));
11 printf("*(*(*ptr)) = %x/n", *(*(*ptr)));
12
13 return 0;
14 }
~/testbench> gcc -o aa aa.c
aa.c: In function 'main':
aa.c:10: error: invalid type argument of 'unary *'
aa.c:11: error: invalid type argument of 'unary *'
2
3 int main()
4 {
5 int data = 0;
6 int *ptr = &data;
7
8 printf("ptr = %x/n", ptr);
9 printf("*ptr = %x/n", *ptr);
10 printf("*(*ptr) = %x/n", *(*ptr));
11 printf("*(*(*ptr)) = %x/n", *(*(*ptr)));
12
13 return 0;
14 }
~/testbench> gcc -o aa aa.c
aa.c: In function 'main':
aa.c:10: error: invalid type argument of 'unary *'
aa.c:11: error: invalid type argument of 'unary *'