Read the following statements about functions in C and choose the correct option:
(i) A function in C can return only one value directly.
(ii) Function names can be the same as variable names in the same scope.
(iii) A function must always take at least one argument.
(iv) Recursion is allowed in C functions.
Explanation
Let's analyze each statement:
(i) Correct: In C, a function can return only one value directly via the return statement. To return multiple values, programmers must use pointers, structures, or arrays.
Return capacity=1 (Directly)
(ii) Incorrect: In the same scope, an identifier cannot be used for both a function and a variable; this would cause a naming conflict (redefinition error).
(iii) Incorrect: A function in C does not need arguments. A function can be defined with void as its parameter list, meaning it accepts no arguments.
(iv) Correct: C supports recursion, where a function calls itself to solve smaller instances of the same problem.
Recursive Function=f(n)→f(n−1)→⋯→Base Case
Since only statements (i) and (iv) are true, option (B) is the correct choice.