I'm trying to scan in tokens lineated by whitespace.
while(scanf(" %s ", input) != EOF){
printf("%s", input);
}
If I type in:
ggh ghk kfj
My program will output:
gghghk
And once pressing Ctrl-D
, it will then display:
gghghkkfj
I want my program to output: ggh (Ctrl-D) ghk (Ctrl-D)
and then kfj (Ctrl-D)
Please help.