Question
Consider the recursive function: int fact(int
Consider the recursive function: int fact(int
n) { if (n == 0) return 1; return n * fact(n-1); } How many total function calls (including the very first, outermost call) occur when evaluating fact(5)?
More C Programming Questions
- Consider the C structure: struct A { char c; int i; }; On a typical system where int requires 4-byte alignment, what is the most likely total size of struc...
- What is a key difference between the malloc() and calloc() functions in C?
- What is the output of the following C code? int x=0, y=10; if (x || y--) { } printf("%d", y);
- In C++, which access specifier allows members to be accessible only within the class?
- Which of the following statements is correct for Python lists?
- What is the output of the following C++ program?
- In C++, which operator is used to access a member function through a pointer to an object?
- In C, when an array is passed as a parameter to a function, what does sizeof(arr) typically return when evaluated inside that function?
- Which Java keyword is used to inherit a class?
- What is the output of the following C code? int x = 5, y = 2; printf("%d", x++ / y + x % y);
Hey! Ask a query
Please enter email id
The email must be a valid email address.
Please enter Mobile Number
Please enter valid Mobile Number
Please enter your Doubt
Think You're Ready for RBI Grade B?
RBI Grade B 2026 Phase 1 Memory Based Paper
- 200 Questions with Detailed Solutions
- Section-wise Coverage (GA, English, Quant & Reasoning)