A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.cplusplus.com/reference/cstdio/putchar/ below:

function

<cstdio>

putchar
int putchar ( int character );

Write character to stdout

Writes a character to the standard output (stdout).

It is equivalent to calling putc with stdout as second argument.



Parameters
character
The int promotion of the character to be written.
The value is internally converted to an unsigned char when written.

Return Value On success, the character written is returned.
If a writing error occurs, EOF is returned and the error indicator (ferror) is set.

Example
1
2
3
4
5
6
7
8
9
10
/* putchar example: printing the alphabet */
#include <stdio.h>

int main ()
{
  char c;
  for (c = 'A' ; c <= 'Z' ; c++) putchar (c);

  return 0;
}

This program writes ABCDEFGHIJKLMNOPQRSTUVWXYZ to the standard output.

See also
putc
Write character to stream (function)
fputc
Write character to stream (function)
getchar
Get character from stdin (function)

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4