Lesson 24 of 50
cStandard Input / Output (`stdio.h`)
8 mins
Course progress48%
What you'll learn
Keep these ideas in mind as you work through the lesson.
Lesson 24 of 50
c8 mins
Keep these ideas in mind as you work through the lesson.
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 ` |
| `. | |
getchar / putchar | Single‑character I/O. |
Always check the return value of scanf/fgets to verify that input succeeded.