menu
home
Home
search
Search
people
About Us
exit_to_app
Login
home
Home
search
Search
people
About Us
exit_to_app
Login
Practicing for Number Power - Recursion of Algorithms
Questions 1 of 10
Q. What will be the output for following code?
#include< stdio.h >
int func(int x, int y) {
if (y == 0)
return 1;
else if (y%2 == 0)
return func(x, y/2)*func(x, y/2);
else
return x*func(x, y/2)*func(x, y/2);
}
int main() {
int x = 2;
int y = 3;
printf("%d", func(x, y));
return 0;
}
9
6
8
5
Submit
lock
Login
person
Signup
Email
Password
Name
Email
Password
Confirm Password