Call Type of Functions Flashcards
Advantages of Functions in C?
- No need of rewriting the logic/code if we use functions.
2.We can call Functions any times we need.
3.We can easily track Block of codes when multiple functions are used.
Memory Layout of C program?
- Heap(Dynamic free memory)
- Stack(Local variables and functions)
- Global(static).
- Program Code
Function Arguments
1.If a function is to use arguments, it must declare variables that accept the
values of the arguments. These variables are called the formal parameters of
the function.
2. Formal parameters behave like other local variables inside the function and
are created upon entry into the function and destroyed upon exit.
3. While calling a function, there are two ways in which arguments can be
passed to a function −
a. Call by value
b. Call by reference
what are formal parameters?
the Parameters revieved by Function.
What are actual parameters?
The parameter passed to a function.