Write a program to read a line of text containing a series of words from the terminal
#include<stdio.h>
#include<conio.h>
#include<STRING.H>
main()
{
char a[80];
clrscr();
int i=0;
printf("Enter a line:- ");
a[i]=getchar();
while(a[i++]!='!')
{
a[i]=getchar();
}
i=0;
printf("\n Output= ");
while(a[i++]!='!')
{
putchar(a[i]);
}
getch();
}
#include<conio.h>
#include<STRING.H>
main()
{
char a[80];
clrscr();
int i=0;
printf("Enter a line:- ");
a[i]=getchar();
while(a[i++]!='!')
{
a[i]=getchar();
}
i=0;
printf("\n Output= ");
while(a[i++]!='!')
{
putchar(a[i]);
}
getch();
}