Day#79 'C' Coding Challenge

Day#79 'C' Coding Challenge

What is the output of the below code?

#include<stdio.h> void main() { char string[25] = "%s"; printf(string,string); }

----------------------------------------------------

In the above code, character array has been declared.

In the printf function, we require format specifier to indicate the type of output. Instead of format specifier, string has been used which holds %s which itself is a format specifier and then the output to be printed is pointed to string which is %s. So, the output prints %s

Post a Comment

0 Comments