English

Write down the main method which calls the following method: int square(int a) { return(a*a); } - Computer Applications

Advertisements
Advertisements

Question

Write down the main method which calls the following method: 

int square(int a)
{
    return(a*a);
}
Code Writing

Solution

int z = square(S); 
(or) 
int c = 8; 
int z = square(c); 
(or) 
int z = square(ob.nextlnt()); // ob is the Scanner object
shaalaa.com
  Is there an error in this question or solution?
Chapter 5: User - Defined Methods - EXERCISES [Page 337]

APPEARS IN

Avichal Computer Applications [English] Class 10 ICSE
Chapter 5 User - Defined Methods
EXERCISES | Q VI. 6. | Page 337
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×