Because the input stream is usually terminated by pressing the Enter key—telling the operating system that you have finished typing for the time being—it makes sense to collect all the characters that might be in that stream in one go if at all possible. The gets function allows you to do this.
The generic definition for gets is as follows:
char * gets ( char * <string variable> );
You have not yet read about pointers, and it is quite an advanced topic that bears some explanation once you’ve gained more experience with C in general. In the case of the char * pointer, however, it does actually refer to something that you have seen before—an array of characters, otherwise known as a string.
String input and output are performed ...