Advertisements
Advertisements
प्रश्न
Define Recursive method.
व्याख्या
उत्तर
- It is a method designed in such a way that it calls itself in its body. It is used for repetitive operations.
- Example:
int fact(int n) { return (n * fact (n -1)); }
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 5: User - Defined Methods - EXERCISES [पृष्ठ ३३७]