//How to enter string.
#include<stdio.h>
#include<conio.h>
void main()
{
char str[100]; //Declare string variable
clrscr();
printf("Enter the string:");
scanf("%s",&str);
printf("\nYou entered: %s",str);
getch();
}
Output:
Enter the string:abcYou entered: abc
No comments:
Post a Comment