Not exactly.....stdout is by default buffered, so it wont print anything until it reaches a \n (newline character) fflush prints everything thats in the buffer.Originally Posted by xviddivxoggmp3
sscanf will return 2 when two items are entered with a space seperating them. like this:} while (sscanf(buf, "%d %d", &input[0], &input[1]) != 2);
/*loop exit test. if sscanf returns two successful
items of data, then exit. Place data from buff into
array locations addressed by input. Question: does
this exit after two letters are intered in sequentially,
or does it exit upon hitting two keys at once? I do
not have a compiler to test this. */
enter two numbers: 2 2