C. RECURSION

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

C. RECURSION

Post by answerhappygod »

C. RECURSION
C Recursion 1
C Recursion 1 (31.34 KiB) Viewed 8 times
FE-RECURSION-01 If i = 6), how many times will the program be entering the else statement in line 7)? If the program results to an infinite recursion, write INFINITE RECURSION as your answer. 1 #include<stdio.h> 2 int f(int x) 47{ 5 6 8 9 if(x==2) 22 23 } else { return 2; 10 11 12 13 14 int main() 15 { 16 17 18 19 20 21 } printf("*"); f(x-1); int n, i; scanf("%d", &i); n=f(i); printf("%d",n); return 0;
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply