---
title: "Types of standard I/O in C"
subject: "Computer Programming"
chapter: 10
key: "semester_1/computer_programming:standard-io-types"
source: https://www.bctengineer.com/q/semester_1/computer_programming/standard-io-types
site: BCT Engineering
---

# Types of standard I/O in C

Computer Programming · Chapter 10: Data Files

- Asked in: 2072 Kartik, 2 marks
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_1/computer_programming/standard-io-types
- Whole chapter: https://www.bctengineer.com/md/semester_1/computer_programming/chapter-10

## Question

List different types of standard I/O used in C.

## Short answer

Standard I/O includes console streams stdin, stdout, stderr; formatted I/O with printf/scanf; unformatted I/O: character getchar/putchar and string fgets/puts; and file I/O through functions like fprintf, fscanf, fread, fwrite.

## Answer

C has the following kinds of standard input/output:

1. **Console (stream) I/O through the three standard streams:** `stdin` (keyboard, standard input), `stdout` (screen, standard output) and `stderr` (screen, standard error output).
2. **Formatted I/O:** `printf()` and `scanf()` with format specifiers.
3. **Unformatted I/O:** character functions `getchar()`, `putchar()`, `getch()`, `getche()`, and string functions `gets()`, `puts()`. (`getch()` and `getche()` come from `<conio.h>` and are not part of standard C; `gets()` is unsafe and was removed in C11, so `fgets()` is used instead.)
4. **File I/O:** `fprintf`, `fscanf`, `fgetc`, `fputc`, `fread`, `fwrite` on files.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. Which are the three standard streams?
   A. stdin, stdout, stderr
   B. stdio, stdin, stdout
   C. input, output, error files
   D. printf, scanf, gets
   Answer: A. They are keyboard input, screen output and screen error output. (Key point: Standard streams)

2. Which functions perform formatted console I/O?
   A. getchar and putchar
   B. printf and scanf
   C. gets and puts
   D. fread and fwrite
   Answer: B. printf and scanf use format specifiers. (Key point: Formatted I/O)

## Related in other subjects

- [Standard penetration test and corrections](https://www.bctengineer.com/question.md?key=semester_5%2Ffoundation_engineering%3Aspt-procedure-corrections) — Foundation Engineering, chapter 2, asked 3×
- [Superheterodyne AM receiver; why standard AM in broadcasting](https://www.bctengineer.com/question.md?key=semester_6%2Fcommunication_systems%3Asuperhet-am-receiver-standard-am) — Communication Systems, chapter 2, asked 2×
