ProgrammingModerateTCS CodeVita · Infosys HackWithInfy

What is printed?

What is printed?
import sys
print(sys.getrecursionlimit())
  1. A. 1000
  2. B. 3000
  3. C. 100
  4. D. 10000

Correct answer: A. 1000

CPython's default recursion limit for Python frames is 1000. sys.setrecursionlimit raises it, but going very high can still crash the C stack, which is why iterative code is safer on judges.

More Python Programming questions

Exams that ask this topic