0
Can anyone explain this program
char * a="Coding"; char *b=(++a)+1+1; printf("%c",*b); Ans = i please anyone explain here. Thanks in advance.
2 Réponses
+ 3
adding 1 to pointer results in change of memory address by sizeof(base class or data type)
so ++a on char *a causes char *a to point to next memory address i.e. address of letter o.
Now doing that again two time as +1 causes to move pointer to d and then to i.
so i is printed
0
thanks a lot sir.