C | Functions | Question 3

Which of the following is true about return type of functions in C?
(A) Functions can return any type
(B) Functions can return any type except array and functions
(C) Functions can return any type except array, functions and union
(D) Functions can return any type except array, functions, function pointer and union


Answer: (B)

Explanation: In C, functions can return any type except arrays and functions. We can get around this limitation by returning pointer to array or pointer to function.

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.

My Personal Notes arrow_drop_up
Article Tags :
Practice Tags :


1


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.