//Program to show the concept of gets and puts function.
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
char str[20];
int l;
clrscr();
printf("Enter the string: ");
gets(str);
l=strlen(str);
printf("The string is:");
puts(str);
printf("the length of string is %d",l);
getch();
}
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
char str[20];
int l;
clrscr();
printf("Enter the string: ");
gets(str);
l=strlen(str);
printf("The string is:");
puts(str);
printf("the length of string is %d",l);
getch();
}