Computer Applications
Debug the errors and rewrite the following method prototypes:
(a) int sum(x,y);
(b) float product(a,int y);
(c) float operate(int x, float=3.4);
(d) float sum(int x,y);
User Defined Methods
87 Likes
Answer
(a) int sum(int x, int y)
(b) float product(float a, int y)
(c) float operate(int x, float y)
(d) float sum(int x, float y)
Answered By
50 Likes
Related Questions
When a method returns the value, the entire method call can be assigned to a variable. Do you agree with the statement?
When a method is invoked how many values can be returned from the method?
Write down the main method which calls the following method:
int square(int a) { return(a*a); }What happens when a method is passed by reference? Explain.