题目
题目

IS 4485-001 Fall 2025 Final Exam Practice 1

单项选择题

Which of the following situations might cause a recursive function to run infinitely?

选项
A.Using global variables
B.Passing zero as argument
C.No base case or unreachable base case
D.Using iterative loops inside the function
E.Using a return statement
F.Having a base case
查看解析

查看解析

标准答案
Please login to view
思路分析
To evaluate when a recursive function might run infinitely, we need to consider how recursion proceeds and termination is achieved. Option 1: 'No base case or unreachable base case' would indeed lead to infinite recursion, because each call would continue to invoke itself without a condition to stop, so the recursive chain never ends. Option 2: 'Passing zero as argument' could......Login to view full explanation

登录即可查看完整答案

我们收录了全球超50000道考试原题与详细解析,现在登录,立即获得答案。

更多留学生实用工具

加入我们,立即解锁 海量真题独家解析,让复习快人一步!