Chapter - 4: Functions

State True or False:


A
Sections
1
Exercises

(a) If the function is defined before calling, there is no need to mention its prototype.
True.

(b) Two functions can be overloaded if their arguments are similar but their return values are different.
False: Only return type alone cannot distinguish two overloaded functions

(c) Two functions can be overloaded only if their arguments differ in number, order or type.
True.

(d) If default values are mentioned for the four arguments in the function prototype, we can call this function and pass it the first and the fourth argument.
False: Values can only be passed from left to right (without skipping in-between values).

(e) A function can be overloaded any number of times.
True.

(f) The assignment operator cannot be overloaded.
False: only sizeof , ::, . and  ? : cannot be overloaded, and except them, any operator can be overloaded. (conditions are there).

(g) When we define the unction to inline there is no guarantee that its code would get inserted at the place where the call is being made.
True.

(h) The side effects of the macro definition get eliminated if we use inline functions.
True.


© 2021 Garbage Valuegarbage value logo