#include <stdio.h>
#include <stdlib.h>
int main()
{
char *str="Helloworld";
printf("%d",printf("%s",str));
return 0;
}
output of this program is Helloworld10 instead of Helloworld1
from where that miscellaneous zero comes
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Why would you like the program to write
Helloworld1? What should that 1 come from?the return value of functions of the
printffamily is the number of characters outputted (except the final\0for the variants likesprintf).Helloworldhas length 10.