Single Choice
Not Set
QWhat will be the output of the following program?
#include
void main()
{
printf("Rambo \n");
printf("\"Rambo\" \n");
printf("\\Rambo\\ \n");
printf("50%% \n");
}
ID: #1263
Constant in C Language
1,989 views
Question Info
#1263Q 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
Explanation
Without a backslash, special characters have a natural special meaning. With a backslash they print as they appear.
\ - escape the next character " - start or end of string ’ - start or end a character constant % - start a format specification \\ - print a backslash \" - print a double quote \’ - print a single quote %% - print a percent signThe statement
printf(" \" ");
will print you the quotes. You can also print these special characters \a, \b, \f, \n, \r, \t and \v with a (slash) preceeding it. Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic