Fandom

Programmer's Wiki

C/putchar

< C

406pages on
this wiki
Add New Page
Talk0 Share

Synopsis Edit

#include <stdio.h>
int putchar(int ch);

Description Edit

putchar writes the ch character to stdout.

On success, ch is returned. EOF is returned if an error occurred.

Examples Edit

#include <stdio.h>

int main()
{
  putchar('H');
  putchar('e');
  putchar('l');
  putchar('l');
  putchar('o');
  putchar('\n');

  return 0;
}

This will simply print "Hello", followed by line feed, to stdout.

See also Edit

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.