Call Type of Functions Flashcards

1
Q

Advantages of Functions in C?

A
  1. 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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Memory Layout of C program?

A
  1. Heap(Dynamic free memory)
  2. Stack(Local variables and functions)
  3. Global(static).
  4. Program Code
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Function Arguments

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

what are formal parameters?

A

the Parameters revieved by Function.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are actual parameters?

A

The parameter passed to a function.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly