Most likely you will use a combination of fgets to read a line from stdin, then sscanf to get the data into the variables required.
fgets reads the entire line as a string, yes. It also leaves the newline in the buffer, so you should remove it like so:
Code:
char buffer[1024]; // This needs to be large enough to fit the largest line you'll read
if (fgets(buffer, sizeof(buffer), stdin) != NULL)
{
// Remove the newline
buffer[strlen(buffer) - 1] = 0;
}
As I stated above, use sscanf to get formatted input into variables. Google for sscanf and read the docs well.