Lesson 24 of 50 · c
Standard Input / Output (`stdio.h`)
Duration: 8 mins
The <stdio.h> library provides the core I/O functions.
| Function | Purpose |
|---|---|
printf | Formatted output to stdout. |
scanf | Formatted input from stdin. |
fprintf/fscanf | I/O to/from a FILE*. |
fgets | Read a line safely (avoids buffer overflow). |
puts | Write a string followed by \n. |
getchar / putchar | Single‑character I/O. |
Always check the return value of scanf/fgets to verify that input succeeded.