Why the second statement of putchar is not executing?

#include <stdio.h>

int main(void) {
putchar(getchar());
putchar(getchar());
return 0;
}

I had given the input: a b. But it is printing only a.

On my laptop, itโ€™s printing both chars: the a, and the space that comes after it :slight_smile:

2 Likes

I got it๐Ÿ˜‡

1 Like