🧠 C Programming Notes – Unit III Summary
This PDF covers Decision Control Statements, Looping, Functions, Recursion, and Storage Classes in C language. It’s a complete guide for beginners learning how to control program flow and organize code efficiently.
1. Decision and Control Statements
These statements help control the order in which instructions are executed.
- Branching statements:
goto,if,if-else,nested if,else-if ladder,switch - Examples include checking if a number is positive, finding the largest of two numbers, or determining voting eligibility.
2. Looping Statements
Used for repeating a set of instructions until a condition is met.
- while loop: checks the condition first (entry-controlled).
- do-while loop: runs once before checking the condition (exit-controlled).
- for loop: combines initialization, condition, and increment in one line.
- break exits a loop early, and continue skips one iteration.
3. Functions in C
Functions divide a large program into smaller modules for clarity and reuse.
- Types: Library functions (like
printf(),scanf()) and User-defined functions. - Explains function prototype, definition, call, and return statements.
- Includes all four categories:
- With arguments & return value
- With arguments & no return value
- Without arguments & return value
- Without arguments & no return value
4. Recursion
Recursion means a function calling itself. Example: finding factorial or solving Tower of Hanoi.
The notes compare recursion vs iteration — recursion uses more memory but simplifies logic.
5. Storage Classes
Storage classes define the scope, lifetime, and visibility of variables.
- auto: default, local to the function
- extern: global, accessible from all functions
- static: retains value even after function ends
- register: stored in CPU register for faster access
💡 In Short
This PDF is a great reference for anyone studying Unit III – Control Statements, Loops, Functions, Recursion, and Storage Classes in C. It’s full of examples and simple programs for practice.
📄 Read the Full PDF Below:
If you can’t view the PDF properly, click here to open it in a new tab.