+ 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
Mik
Mik - avatar
5 odpowiedzi
+ 9
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
Mik
Mik - avatar
+ 2
Thanks for your help
7th Mar 2022, 10:47 PM
Mik
Mik - avatar
0
Hello
14th Feb 2023, 11:20 AM
Jahongir Islomov
Jahongir Islomov - avatar