Advertisements
Advertisements
प्रश्न
Answer the following in brief. Give a reason/example wherever applicable.
What are the types of method prototypes?
कारण सांगा
Advertisements
उत्तर
- Method prototype with no parameters: A method that does not accept any arguments.
Example:void display(); - 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 [पृष्ठ ९१]
