Thursday, 11 August 2016

Unformatted Input and output functions for string


Unformatted Input and output functions for string


#include<stdio.h>
void main()
{
           char s[10];
           printf("\nEnter a string: ");
           gets(s);                      //unformatted input
           printf("\nEntered string is: ");
           puts(s);                    //unformatted output
}

Output:
Enter a string: How are you
Entered string is: How are you

No comments:

Post a Comment