How to use
Some of the important points about
gets() both are used to take input from the user.
scanf() can only take input until it encounters a space. The words after space are ignored by it.
gets() is used to take a single input at a time but can be used to input a complete sentence with spaces unlike scanf().
Below is a program on use of
gets() takes only a single line at a time i.e all the words before hitting \n(enter key).
printf("\n\n\t\tStudytonight - Best place to learn\n\n\n");
char str; // char array of size 50
printf("Enter your complete name:\n\n\n");
printf("\n\nWelcome to Studytonight %s\n\n\n", str);
printf("\n\n\t\t\tCoding is Fun !\n\n\n");