Learn C Programming

Lesson 2 of 8 · Functions, Scope and Storage Classes

Module 7 · Functions, Scope and Storage Classes

Parameters, Return Values and Prototypes

Free with an accountReading

Zara's school calendar needs the leap year rule in four places. February's length, a year's length, the next leap year and a date check all ask it.

Checking what this lesson needs for you…

What is inside Parameters, Return Values and Prototypes

  1. Parameters: boxes filled by the call
  2. return hands a value back
  3. Prototypes: the shape before the call
  4. What GCC 12 does without one
  5. (void) means no parameters
  6. Leave early with return
  7. A function must return on every path
  8. bool functions and names that ask a question