Write a c program to illustrate getchar and putchar
#include<stdio.h>
#include<conio.h>
void main()
{
char ch;
clrscr();
printf("Enter the character: ");
ch=getchar();
printf("Entered character is: ");
putchar(ch);
getch();
}
Output:
Enter the character: f
Entered character is: f
No comments: