+ 2
MCQ question in 'c'
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
2 Answers
+ 5
I think the answer is b
here is an example of functions that make the rest choices wrong
returning union
union t{};
union t f(){ union x; return x;}
//it works so you can do it
function that return a function pointer
https://code.sololearn.com/cI51x9v9CPUn/?ref=app
Now a and c and d is wrong so b is the correct answer
0
Ans is b)it cannot return array