GETS() & PUTS() FUNCTIONS

Functions gets() and puts() are two string functions to take string input from the user and display it respectively.


1A_Pro17: W.A.P. to perform gets() and puts() function on string.


#include<stdio.h>
#include<conio.h>
void main()
{
          char name[30];
          clrscr();
         
          printf("Enter name: ");
          gets(name);//Function to read string from user.
       
          printf("Name: ");
          puts(name);//Function to display string.
          getch();
}

Output: