If(c=(printf("my name is"))==1){ return 0; }else { return c;} | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

If(c=(printf("my name is"))==1){ return 0; }else { return c;}

why the output is going on in else part.? can anyone please describe it?

19th Dec 2016, 4:38 AM
Shivesh Karan Mehta
Shivesh Karan Mehta - avatar
2 Answers
+ 4
printf return the number of characters that was impresed, so printf("my name is") its different than 1.
19th Dec 2016, 4:43 AM
Nahuel
Nahuel - avatar
0
thank you:)
19th Dec 2016, 4:43 AM
Shivesh Karan Mehta
Shivesh Karan Mehta - avatar