How to write a C Program To Input & Print More Than One Words In Single Line in C Programming Language ?
Solution For C Program :
/*C Program To Input & Print More Than One Words In Single Line.*/
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
char s1[50];
int len;
clrscr();
printf("\nEnter the string:");
scanf("%[^\n]",s1);
printf("Output string:%-50s",s1);
len=strlen(s1);
printf("\nlength of the string =%d",len);
getch();
}
You may also learn these C Program/Code :