Correct Answer : D
Inside the main
method, there is call to the method sum
declared with two float
parameters. This leads to a compilation error, since the only defined method sum
does not take any parameters. Also, in the declared method sum
the variables m,n
are not accessible, since they are out of scope. So it leads to another compilation error.
Hence the answer is D.