There are three structures; arrays a and b and pointer c :
c --------------------------. | V ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ a --> | a | \0| \0| \0| \0| b | i | g | \0| \0| r | i | d | e | \0| ยดยดยด ยดยดยด ยดยดยด ยดยดยด ยดยดยด ยดยดยด ยดยดยด ยดยดยด ยดยดยด ยดยดยด ยดยดยด ยดยดยด ยดยดยด ยดยดยด ยดยดยด ___ ___ ___ ___ ___ ___ ___ b --> | F | l | y | i | n | g | \0| ยดยดยด ยดยดยด ยดยดยด ยดยดยด ยดยดยด ยดยดยด ยดยดยด
This is the code:
int main(){ char a[3][5]={"a", "big", "ride"}; char b[]="Flying"; char *c=*(a+1); puts(b+(c-*a)-2); return 0; }
Now I can not understand the expression b+(c-*a)-2 . Can someone be kind and break it?
source share