---
name: "getc"
section: "3"
platform: "linux"
package: "man-pages"
version: "6.19-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux", "freebsd", "macos"]
url: "https://new.carta.tech/getc"
---

# getc(3)

get character from stream

## NAME

getc - get character from stream

## LIBRARY

Standard C library (*libc*, *-lc*)

## SYNOPSIS

```
#include <stdio.h>
```

**int getc(FILE \****stream***);**

## DESCRIPTION

**getc**() is equivalent to [**fgetc**(3)](/fgetc/3.md), except for the BUGS (see below).

Use [**fgetc**(3)](/fgetc/3.md) instead.

## STANDARDS

C23, POSIX.1-2024.

## HISTORY

POSIX.1-2001, C89.

## BUGS

### Multiple evaluation

It may be implemented as a macro, and it may evaluate *stream* more than once.

### Name

The name is inconsistent. It is often confused with [**getchar**(3)](/getchar/3.md), as normally *\<stdio.h\>* functions without the "f" prefix in their name are variants that use *stdin*.

## SEE ALSO

[**fgetc**(3)](/fgetc/3.md)
