Sail E0 Webinar
Question

What will be output if you compile following c code ?


void main()
{
char *str = "Placementadda";
printf("%d",printf("%s",str));
}


Options:
A .  11Placementadda
B .  10Placementadda
C .  Placementadda10
D .  Placementadda11
E .  Other
Answer: Option E

Return type of printf is integer and the value of this integer is
exactly equal to number of character including white space printf
function prints. so here printf("Placementadda") will return 13



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

More Questions on This Topic :

Latest Videos

Latest Test Papers