getchar takes one character from the stadin and putchar shouldCode:#include<stdio.h> int main () { int c; while((c=getchar()) !=EOF) putchar(c); }
print that character before any more input.
then
why the output is
hello
hello
instead of hheelllloo