हिंदी

Answer the following in brief. Give a reason/example wherever applicable. What are the types of method prototypes?

Advertisements
Advertisements

प्रश्न

Answer the following in brief. Give a reason/example wherever applicable.

What are the types of method prototypes?

कारण बताइए
Advertisements

उत्तर

  1. Method prototype with no parameters: A method that does not accept any arguments.
    Example: void display();
  2. Method prototype with parameters: A method that accepts one or more arguments.
    Example: void add(int a, int b);

Reason: Method prototypes define the method name, return type, and parameters before the actual method implementation.

shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 3: User-Defined Methods - Exercises [पृष्ठ ९१]

APPEARS IN

रुपा पंडित Computer Applications [English] Class 10 ICSE
अध्याय 3 User-Defined Methods
Exercises | Q 5. (ii) | पृष्ठ ९१
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×