What is the return type of the following function?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

What is the return type of the following function??

int func( double a, char b) option 1) double 2) int 3) char explain me why??

8th Nov 2016, 4:37 PM
zerin jawah
zerin jawah - avatar
2 Answers
+ 4
return type is int. The return type of the function is declared before its name. As you can see the code says int func, where func is the name of the function, int is the return type. a and b are the parameters of the function.
8th Nov 2016, 5:17 PM
James Flanders
+ 1
int, that's how the function is declared.
8th Nov 2016, 7:21 PM
Max Adams
Max Adams - avatar