+ 1
pointers
int a[5] = {22, 33, 44, 55, 66}; int *ptr = NULL; ptr = a; printf("%d %x\n", *ptr, ptr); ptr++; printf("%d %x\n", *ptr, ptr); ptr += 3; printf("%d %x\n", *ptr, ptr); ptr--; printf("%d %x\n", *ptr, ptr); ptr -= 2; printf("%d %x\n", *ptr, ptr); In this case , Can i use '0' (zero) instead of 'NULL'.
2 Antworten
+ 4
Yes you can.
+ 2
Ipang is right.