You are designing a COBOL program to calculate the factorial of a number using a recursive subprogram. Which type of recursion is involved in this scenario?
- Direct Recursion
- Indirect Recursion
- Mutual Recursion
- Tail Recursion
In this scenario, Mutual Recursion is involved when two or more subprograms call each other to calculate the factorial. It creates a cycle of calls among the subprograms.
Loading...
Related Quiz
- Which file organization in COBOL allows for both sequential and random access to records?
- What is the purpose of exception handling in COBOL file processing?
- Which COBOL data type is commonly used to store date and time values?
- In a complex COBOL program, you notice the extensive use of the "LINKAGE SECTION." What is the primary purpose of this section, and when is it commonly used?
- When using the EXTERNAL clause in COBOL, how can you ensure variable visibility across different programs?