Unformatted Input and output functions for character
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