I am aware fgets() and gets() but I was told those two functions are deprecated so I would rather use something else. I used scanf but the issues I am running into is that scans stops reading after it hits a space so if I entered a first and last name then it would only return the first string. This is my original code for user input with scanf but I realized if a user has three strings like John Doe Smith then it would only read John Doe.
char firstName[100], lastName[100];
printf("Please enter your first and last name: \n");
scanf("%s%s", firstName, lastName);
This returns the right idea but only if user inputs two strings like John Doe.
since its the beginning of the semester, I want to keep the code simple and not get into any other functions that seem too much to use.