MCQ
Single Best Answer
Not Set
QWhat is the output of this C code?
#include
int main()
{
printf("C programming %s", "Class by\n%s atnyla", "WOW");
}
ID: #1359
Constant in C Language
2,759 views
Question Info
#1359Q ID
Not SetDifficulty
Constant in C LanguageTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer: Option C
Explanation
Answer:c
This program has only one %s within first double quotes, so it does not read the string "WOW". The %s along with the Sanfoundry is not read as a format modifier while new line character prints the new line. Output:
This program has only one %s within first double quotes, so it does not read the string "WOW". The %s along with the Sanfoundry is not read as a format modifier while new line character prints the new line. Output:
$ cc pgm2.c $ a.out C programming Class by %s atnyla
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic