MCQs
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.
Any function including main() can be called recursively.
A function cannot be defined inside the another function, but a function can be called inside
a another function.
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.
True, The default return type for a function is int.
Yes, this function calculates and return the factorial value of an given integer num.
The correct form of function f prototype is float f(int, float);
In printf("%p`setminus`n", main()); it calls the main() function and then it repeats infinetly,
untill stack overflow.
In a ternary operator, we cannot use the return statement. The ternary operator
requires expressions but not code.
The function void f() is not visible to the compiler while going through main() function.
So we have to declare this prototype void f(); before to main() function. This kind of
error will not occur in modern compilers.