Computer Applications
Write down the main method which calls the following method:
int square(int a)
{
return(a*a);
}
Related Questions
When a method is invoked how many values can be returned from the method?
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);
What happens when a method is passed by reference? Explain.
In what situation does a method return a value?