Write a c program to read and write a character,write a program to input a character and display it
Write a c program to read and write a character
#include<stdio.h>
#include<conio.h>
void main()
{
char ch;
clrscr();
printf("Enter the character: ");
ch=getchar();
printf("Inputted character is ");
putchar(ch);
getch();
}
Output:
Enter the character: H
Inputted character is H
No comments: