+ 1
How can it's answer be case 3?
switch(printf("hi-")){ case 1: printf("a"); break; case 2: printf("b"); break; case 3: printf("c"); break; default: printf("default");
4 Antworten
+ 3
Updated: Not exactly, if printf("Some\0Text");
"Some" will be the output and printf() returns 4. So it literally returns the length of "printed" characters.
https://code.sololearn.com/ciBBdjlR0R1l/?ref=app
+ 4
printf() returns the length of printed characters. printf("hi-") returns 3.
+ 1
CarrieForle, So in switch statement, printf() function returns the number of charaters enclosed in double quotation?
0
Thanks bro!!!
😊😊😊