C Programming - Input / Output - Discussion

Discussion Forum : Input / Output - Find Output of Program (Q.No. 10)
10.
What will be the output of the program ?
#include<stdio.h>

int main()
{
    printf("%%%%\n");
    return 0;
}
%%%%%
%%
No output
Error
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
36 comments Page 3 of 4.

Salesh said:   2 decades ago
As similarly if you want to print \n in C the syntax is

printf("\\n");

Same concept is here also.

Sharath said:   1 decade ago
Yes the answer given by Niranjan is correct.

Mangai said:   1 decade ago
Ya I accept Niranjan's answer.

Thank you Niranjan for giving the detailed ans.

Premnath said:   1 decade ago
Ya the answer given by Niranjan is correct and also the ans given by the Salesh is also correct.

Thanks to both of them.

Praveen said:   1 decade ago
Salesh has given good logic.

Thank you Salesh.

Prateek said:   1 decade ago
There is no logic behind above answers.

Why happend it?

Madhu said:   1 decade ago
Is it right?

KRISHNAKANTH YENUMULA said:   2 decades ago
Why four % are not printed?

Ponrasu said:   1 decade ago
why for printing %% in c?? wat reason?? tis is only c are c++

Rajkumar said:   1 decade ago
After the % the C expects a format specifier so it assumes one % as format specifer and prints %% as output


Post your comments here:

Your comments will be displayed after verification.