C examples for Pointer:Pointer Variable
What will this program print?
#include <stdio.h> int main(void) { int ref[] = {8, 4, 0, 2}; int *ptr; /*from w w w . j a v a 2 s .co m*/ int index; for (index = 0, ptr = ref; index < 4; index++, ptr++) printf("%d %d\n", ref[index], *ptr); return 0; }