Formatted Input and output functions for string
void main()
{
char s[10];
printf("\nEnter a string: ");
scanf("%s", s); //formatted input
printf("\nEntered string is: ");
printf("%s", s); //formatted output
}
Output:
Enter a string: How are you
Entered string is: How
No comments:
Post a Comment