• C language

    Use Of gets() Function

    Some of the important point to note :: scanf() and 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. It means it takes input of only one word. gets() is used to take a single input at a time but can be used to input a complete sentence with spaces unlike scanf(). It means it gets input from user until user hit enter key. gets() takes only a single line at a time. Example is below #include<stdio.h> #include<conio.h> void main() {…