-
pointers
Okay i have this code
Code:
#include <stdio.h>
int main()
{
int i;
int *ptr;
int **pptr;
i = 01234;
ptr = &i;
pptr = &ptr;
printf("**pptr = %u\n", **pptr );
return 0;
}
I get 668 but when i remove the 0 i get 1234 .If i put 3 for i it gives me 3 but if i put a 0 like 03 it gives me 83 .Why does it do that ..Thanks
-
Zero before a number denotes "octal", which is a base-eight number system instead of base-ten. 0x in front of a number uses hex which is base-sixteen.
It has nothing to do with pointers.
Quzah.