What will be the output of the following code? [code] void my_recursive_function(int n) { if(n == 0) { printf("False");

What will be the output of the following code?
Code:
void my_recursive_function(int n)
{
    if(n == 0)
    {
         printf("False");
	   return;
    }
    if(n == 1)
    {
         printf("True");
         return;
    }
    if(n%2==0)
    my_recursive_function(n/2);
    else
    {
         printf("False");
         return;
    }
}
int main()
{
     my_recursive_function(100);
     return 0;
}
A. True
B. False
 

Tìm kiếm

Back
Top