getchar putchar stdin stdout c

Solutions on MaxInterview for getchar putchar stdin stdout c by the best coders in the world

showing results for - "getchar putchar stdin stdout c"
Alina
03 Apr 2016
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}
similar questions
queries leading to this page
getchar putchar stdin stdout c