#include <stdio.h>
int main () {
char c;
printf("Enter character: ");
c = getchar();
printf("Character entered: ");
putchar(c);
return(0);
}
#include <stdio.h>
int getchar(void);
int getchar(void)
/* returns either:
* 1. In SUCCESS: The character read as an unsigned char casted to an int.
* 2. In FAILURE: EOF on end of file or error.
*/
Code Example |
---|
:: |
:: |
:: |
:: |
:: |
:: |
:: |
:: |
:: |
:: |
:: |
:: scopes in c |
C :: |
:: |
:: |
:: |
:: |
:: |
:: |
:: |
:: |
:: |
:: |
:: |
:: |
:: |
:: |
:: |
:: |
Dart :: |