What would be the output of this Code ?

Hello, Guys let’s have a fun, i am giving ¬†you a code just tell me what will be the output of this code if you enter there parameters.

For Test case 1 -->Q
For Test case 2 -->QQ

Please tell why putchar() function is not working and if it is working why it is not taking any Char input?


#include <stdio.h>
main()
{
putc(getc(stdin),stdout);
putchar(getchar( ));
return 0;
}

Explain the output for these test cases.