pointers | Sololearn: Learn to code for FREE!

+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'.

10/8/2020 12:59:34 PM

Pavin Raviselvam

2 Answers

New Answer

+4

Yes you can.

+2

Ipang is right.