wiz-icon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

int f(int n)
{
static int r = 0;
if ( n< = 0)
return 1 ;
if (n > 3 )}
{
r = n ;
return f ( n - 2)+ 2;
}
returns f (n-1) +r;
}
The value of f (7) is ______

A
27
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
21
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
C
23
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
25
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is B 21

flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Algebra of Derivatives
MATHEMATICS
Watch in App
Join BYJU'S Learning Program
CrossIcon