formated I/O functions?



getchar()   is used to read a character  from keyboard and store this character into  a memory location .you have to press enter key after typing a character .

the syantax is show on below .

char varname     =    getchar();

putchar() is used to display a character store in the memory location on the screen.

# include<stdio.h>


void main()


char x;

char y=’n’;

printf(“enter one letter terminated  by enter key”);

x= getchar(y);

putchar(x);    //printf(“%d”,x);






enter one character m





Leave a Reply

Your email address will not be published. Required fields are marked *