#include <stdio.h>
int main(int argc, char **argv){
    int c;
    char str[10];
    while ((c=getchar()) != '\n') {
        scanf("%s",str);
    }
    printf("%s\n", str);
}
If the input is "Data", the output is "ata" where the "D" is missing. Can't figure out why. Any explanation?
 
     
     
     
     
    