C Programming - Functions
Exercise : Functions - True / False Questions
1.
A function cannot be defined inside another function
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
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
Answer: Option
Explanation:
True, The default return type for a function is int.
4.
In C all functions except main() can be called recursively.
Answer: Option
Explanation:
Any function including main() can be called recursively.
5.
Functions can be called either by value or reference
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.
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers