-
What will be the output of the following C code?
#include <stdio.h>
int main()
{
printf("C programming %s", "Class by\n%sInterview Mania", "Woowoo");
}
-
- C programming
- C programming Class by Interview Mania Woowoo
- Compilation Error
- C programming Class by
%sInterview Mania - None of these
Correct Option: D
This program has only one %s within first double quotes, so it does not read the string “WOW”.
The %s along with the Interview Mania is not read as a format modifier while new line character prints the new line.