+ 3

Can sameone help me to understand this code plz ↓↓

char str[]="%d %c", arr[]="Sololearn"; printf(str, 0[arr], 2[arr+3]); //output:83 e //I catch nothing the second line of print

7th Mar 2022, 9:07 AM
RDC+243
RDC+243 - avatar
4 Answers
+ 7
I think the above explanation is sufficient, but I'd like to add the followings arr+3 is a kind of pointer operation, please try this code for your understanding char arr[]="Sololearn"; printf("%s\n",arr+0); // => Sololearn printf("%s\n",arr+1); // => ololearn printf("%s\n",arr+2); // => lolearn printf("%s\n",arr+3); // => olearn
7th Mar 2022, 9:47 AM
Satoshi Hirano
Satoshi Hirano - avatar
+ 2
Satoshi Hirano need your help sir
7th Mar 2022, 9:12 AM
RDC+243
RDC+243 - avatar
+ 2
Thanks for your help
7th Mar 2022, 10:47 PM
RDC+243
RDC+243 - avatar