ExamVeda
Login
Home
This question belongs to C Program Function
Function
?

Pick the correct statements.
I.   The body of a function should have only one return statement.
II.  The body of a function may have many return statements.
III. A function can return only one value to the calling environment.
IV. If return statement is omitted, then the function does its job but returns no value to the calling environment.

Answer & Solution
Correct Answer: Option C
Let's discuss the solution. Join the discussion
Examveda
Question posted by Examveda
Community

Join the Discussion

8 Comments
Lucky Nirala
Lucky Nirala 5 years ago
What will be the output of the following C code? #include void main() { int a[2][3] = {1, 2, 3, 4, 5}; int i = 0, j = 0; for (i = 0; i < 2; i++) for (j = 0; j < 3; j++) printf("%d", a[i][j]); }
Neeraja Sanapala
Neeraja Sanapala 6 years ago
I think option || is wrong and |V is correct
Abishek R
Abishek R 7 years ago
a function can return only one value
Harsh Hitesh
Harsh Hitesh 8 years ago
if we only add printf or scanf function inside function (which we have defined),and not writing return statement ,then also function works.

so 4th option should be correct.
Swathi Gowroju
Swathi Gowroju 9 years ago
I feel that , IV option is also true. Its not mandatory to keep a return statement for a function in C. even if we didn't specify return statement, function will do its job and returns to calling function. In this process function returns no value to calling environment.
Pratiksha Rao
Pratiksha Rao 9 years ago
I didnt get this...
Umang Mahant
Umang Mahant 9 years ago
seriously??how??
Shyam Modanwal
Shyam Modanwal 10 years ago
how it is please explane
it