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;
}
Discussion:
36 comments Page 4 of 4.
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.
Thanks to both of them.
Mangai said:
1 decade ago
Ya I accept Niranjan's answer.
Thank you Niranjan for giving the detailed ans.
Thank you Niranjan for giving the detailed ans.
Sharath said:
1 decade ago
Yes the answer given by Niranjan is correct.
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.
printf("\\n");
Same concept is here also.
Niranjan said:
2 decades ago
Because we can't print % in C.
To print % we need %% in C for printing single %.
Hence to print %% we need %%%%.
To print % we need %% in C for printing single %.
Hence to print %% we need %%%%.
KRISHNAKANTH YENUMULA said:
2 decades ago
Why four % are not printed?
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers