Table of Content

fputchar >> Stdio.h >> Header File in C Programming



fputchar :

  1. fputchar Outputs [Writes]  a character to stdout
  2. fputchar(c), which is the same as fputc(c, stdout).
  3. Outputs character c to stdout
  4. fputchar is the function version of the putchar macro.
#include<stdio.h>
int main(void)
{
char ch;

/* prompt the user for input */
printf("Enter a character : ");

/* read the character from stdin */
ch = fgetchar();

/* display what was read */
printf("The character read is: '%c'",ch);

return 0;
}

Return Type :

  1. On Success : Next character from the input stream pointed to by stdin.
  2. On error : Returns EOF