Thursday, 11 August 2016

Unformatted Input and output functions for character

Unformatted Input and output functions for character


#include<stdio.h>
void main()
{
              char c;
              printf("\nEnter a character: ");
              c = getchar();                    //unformatted input
              printf("\nEntered character is: ");
              putchar(c);                     //unformatted output
}

Output:
Enter a character: h
Entered character is: h

No comments:

Post a Comment