Function Prototypes and Scope
Learn about function declarations, local and global variables, and the scope of variables in C.
1
Function Prototypes and Scope
Function prototypes help declare functions before they are used.
Variable scope determines where a variable can be accessed.
In this lesson, you will learn:
- How to use function prototypes.
- The difference between local and global variables.
- How variable scope affects program behavior.

2
What is a Function Prototype?
A function prototype is a declaration of a function before it is defined.
Syntax:
returnType functionName(parameterType1, parameterType2);
Example:
int add(int, int);All lessons in this course
- Defining and Calling Functions
- Function Prototypes and Scope
- Recursion in C