Functions in C for Unit III: User-Defined Functions, Inter-Function Communication, Storage Classes, and Scope Rules

The syllabus for this unit covers functions, inter-function communication, storage classes, and scope rules — and this blog already has a complete, detailed 3-part series covering exactly this ground in depth. Rather than repeat that material, this post is a short guide mapping each syllabus topic to the right part of that series, plus a … Read more

Functions in C Part 2: Call by Value, Call by Reference, Scope, and Recursion

In Part 1, we covered what functions are and how to declare, define, and call them. In this post, we go deeper into how values actually travel into and out of functions, where variables “live” (scope), and one of the most powerful ideas in programming: a function calling itself, known as recursion. Call by Value: … Read more

Functions in C Part 3: Storage Classes, Function Pointers, and Multi-File Programs

In Part 1 we covered the fundamentals, and in Part 2 we covered parameter passing and recursion. In this final part, we look at three more advanced (but very practical) topics: storage classes, function pointers, and how real projects organize functions across multiple files. Storage Classes A storage class in C controls two things about … Read more

Functions in C Part 1: The Basics — Declaration, Definition, and Calling

A function is a self-contained block of code that performs a specific task. Instead of writing the same logic again and again, you write it once inside a function and call that function wherever you need that task done. This is the single most important idea for writing programs that are longer than a few … Read more