Correct Answer : C
Initially, the main
method of the program is called and the variables m,n
are initialized to the respective values.
Then the method sum
is called which returns a value that is to be stored in the variable o
. Inside the method sum
values of m,n
are printed. Now, the value of m + n = 90.0
is returned and it is typecasted to int
before assigning it to the variable o
. Later o
is printed. Values apart from o
are of type float
and so they are followed by fraction part (.0
).
Hence the answer is C.