Question: In a void function, if the return statement is not given, what will be the outcome ? Select one: a.The compiler throws an error and
In a void function, if the return statement is not given, what will be the outcome ? Select one:
a.The compiler throws an error and prevents the program from getting compiled.
b.There is no error and the function will return after executing the code in the body of the function.
c.The program stops executing and errors out at the end of the function.
d.The program never returns from the function.
Step by Step Solution
There are 3 Steps involved in it
In most programming languages like C or Java a void function is a function that does not return any ... View full answer
Get step-by-step solutions from verified subject matter experts
