What are storage classes in C?
| Class | Meaning |
|---|---|
auto | Default for local variables |
static | Keeps its value between function calls |
extern | Uses a variable defined in another file or place |
register | Hint to keep the variable in a CPU register |
See the full explanation in Scope and Storage Classes.
Learn more about the similar topics:
| Tutorials |
|---|
| C Functions |
| C Function Arguments and Return Value |
| C Call by Value and Call by Reference |
| C Recursion |
| C Scope and Storage Classes |
| Exercises & Assignments |
|---|
| Write a C program to find the factorial of a number using recursion |
| Write a C program to swap two numbers using a function and pointers |