Sample code for placing multiple return statements in a method in C program:
What will be the output of this below program?
i = fun();
Once a function returns, then rest of the lines of that function will not be executed. It is not possible to return two values with two return statements. only first return will work, once first return statement returns, control will go to calling function.Output for this program will be 10.
Back To Top