Program to demonstrate the use of getchar() at the place of scanf
#include<stdio.h>
#include<conio.h>
main()
{
int c;
printf("\nType a character : ");
c=getchar();
printf("\nTyped character is %c",c);
printf("\nTyped character is %d",c);
getch();
}
Comments
Post a Comment