C Programming - Functions

1.
A function cannot be defined inside another function
True
False
Answer: Option
Explanation:

A function cannot be defined inside the another function, but a function can be called inside a another function.


2.
Functions cannot return more than one value at a time
True
False
Answer: Option
Explanation:

True, A function cannot return more than one value at a time. because after returning a value the control is given back to calling function.


3.
If return type for a function is not specified, it defaults to int
True
False
Answer: Option
Explanation:

True, The default return type for a function is int.


4.
In C all functions except main() can be called recursively.
True
False
Answer: Option
Explanation:
Any function including main() can be called recursively.

5.
Functions can be called either by value or reference
True
False
Answer: Option
Explanation:

True, A function can be called either call by value or call by reference.

Example:

Call by value means c = sub(a, b); here value of a and b are passed.

Call by reference means c = sub(&a, &b); here address of a and b are passed.