Write a program to illustrate gets and puts() function in c
#include<stdio.h>
#include<conio.h>
void main()
{
char book[20];
clrscr();
printf("Enter the name of the book: ");
gets(book);
printf("Entered book name is ");
puts(book);
getch();
}
Output:
Enter the name of the book: Programming in c
Entered book name is Programming in c
No comments: