Example for pointer to an array in c:
What is the output of below C program?
char ch = "skill";
char (*p) = &ch;
printf("%c..\n",**(p));//what does it print here?
compile time error
may be crash or some garbage.
p is jumping over that complete array and trying to point to next array of 6 chars, which is not available and so may point to some invalid address which may crash or may print garbage value when tried to dereference.
Back To Top