The terminal always buffers the input characters until an EOF or newline character is reached, i.e. the terminal won't send any info to the C program until that happens. Once EOF or newline character is reached, only then the entered info is sent to the C program (along with the EOF/newline char)
For your case, you can test the output by providing the input in a file.
Create input.txt which contains: qwerty
Assuming you are running windows, run the following to get the output:
gcc program.c -o output.exe
output.exe < input.txt