#include<stdio.h>
#include<conio.h>
main()
{
char *q[]={"black","white","red"};
printf("%s",*q+3);
getch();
return 0;
}
Code gives output "ck
". In this I want to know how *q+3
expression is evaluated.
Means first *q
is evaluated then 3
is added to what *q
points to. In case of integer array it is simple to realise but here *q
points to "black" then 3
is added in what?