1/**
2* USING getchar() and putchar()
3* getchar(): takes input from stdin a char at a time
4* putchar(): displays output at stdout a char at a time
5*/
6
7// This program gets int c from the user(stdin) and returns it back to the terminal (stdout)
8#include <stdio.h>
9int main( ) {
10
11 int c;
12
13 printf( "Enter a value :");
14 c = getchar( );
15
16 printf( "\nYou entered: ");
17 putchar( c );
18
19 return 0;
20}