printf %d

This is infosys question:
Write a program to print %d.

int main()
{
printf("%%d");
return 0;
}

Logic:
%% will print the % character in buffer.
d will print in buffer as usual.

Related Posts