A function that calls itself for its processing is known as:
2015
A function that calls itself for its processing is known as:
- A.
Inline Function
- B.
Nested Function
- C.
Overloaded Function
- D.
Recursive Function
- E.
Question not attempted
Attempted by 876 students.
Show answer & explanation
Correct answer: D
A function that calls itself during its execution is known as a recursive function. This process is called recursion. It is used to solve problems that can be broken down into smaller, similar subproblems. The function must have a base case to stop the recursion and prevent infinite calls.
हिन्दी उत्तर: एक ऐसा फलन जो अपने निष्पादन के दौरान स्वयं को कॉल करता है, उसे पुनरावर्ती फलन कहा जाता है। इस प्रक्रिया को पुनरावृत्ति (recursion) कहा जाता है। यह उन समस्याओं को हल करने के लिए उपयोग किया जाता है जिन्हें छोटे, समान उप-समस्याओं में तोड़ा जा सकता है। फलन में एक आधार मामला होना चाहिए जो पुनरावृत्ति को रोके और अनंत कॉल्स से बचे।