+ 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

15th Aug 2019, 10:30 AM
Brutual bro
Brutual bro - avatar
2 Réponses
+ 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
15th Aug 2019, 9:27 PM
ABADA S
ABADA S - avatar
0
Ans is b)it cannot return array
17th Aug 2019, 5:12 AM
Tony Stark
Tony Stark - avatar