Computer Science, asked by siripuramarun2, 17 days ago

Predict the output
printf("\"NIT %%TRICHY%%\"");

Answers

Answered by guruguru6631
0

Answer:

the output for the program is zero

Answered by ankhidassarma9
0

Answer:

The output of the given statement  printf("\"NIT %%TRICHY%%\"");  is :

"NIT %TRICHY%"

Explanation:

  • Escape Sequences: Escape Sequences can be used both as separate characters and also embedded in single constants.
  • Since, the backslash, the single quotation marks, and the double quotation marks all have specialized meaning when used in constants, they must be separated by escape sequences when we want them as characters. For Example ,

         printf("\" Run, spot, run, \ " she said.");  

         Output: " Run, spot, run,"  she said.

  • '%' is called Format specifiers which is used to  define the type of data to be printed on standard output. We use format specifiers whether we are  printing formatted output with printf() or  accepting input with scanf().
  • '%%' is used for the '%' symbol. It is an escape sequence. As % has special meaning in printf() type functions, we type %% to print the literal %.
  • Hence, we can say that the output of the given statement  printf("\"NIT %%TRICHY%%\"");  is :
  • "NIT %TRICHY%"

For similar kind of Questions, please click here ->

https://brainly.in/question/48311352

https://brainly.in/question/14183941

Similar questions