I am creating a C program using structure
in which I take input of 10 employee information and print it. I'm using for loop
for taking input.
But I'm unable to take the name of the next employee if I use space in between, like this:- JAMES WILLIAM (Imaginary name), But if I write JAMES or JAMES_WILLIAM it will take input of the next employee name.
I have tried scanf("%s", &emp[i].name)
and gets(emp[i].name)
but the same problem is repeating.
You can find my entire program here.
Would greatly appreciate any tips! Thanks for the help!