## Algorithms | Recursion | Question 9

filter_none edit close play_arrow link brightness_4 code #include<stdio.h> void crazy(int n,int a,int b) {     if (n <= 0)  return;     crazy(n-1, a, b+n);     printf(“%d %d %d\n”,n,a,b);… Read More »

## Algorithms | Recursion | Question 8

Predict the output of following program filter_none edit close play_arrow link brightness_4 code #include <stdio.h> int f(int n) {     if(n <= 1)         return 1;     if(n%2… Read More »

## Algorithms | Recursion | Question 7

What does the following function do? filter_none edit close play_arrow link brightness_4 code int fun(unsigned int n) {     if (n == 0 || n ==… Read More »

## Algorithms | Recursion | Question 6

Output of following program? filter_none edit close play_arrow link brightness_4 code #include<stdio.h> void print(int n) {     if (n > 4000)         return;     printf(“%d “, n);     print(2*n);… Read More »

## Algorithms | Recursion | Question 5

What does fun2() do in general? filter_none edit close play_arrow link brightness_4 code int fun(int x, int y) {     if (y == 0)   return 0;… Read More »

## Algorithms | Recursion | Question 4

What does the following function do? filter_none edit close play_arrow link brightness_4 code int fun(int x, int y) {     if (y == 0)   return 0;… Read More »

## Algorithms | Recursion | Question 3

What does the following function print for n = 25? filter_none edit close play_arrow link brightness_4 code void fun(int n) {   if (n == 0)… Read More »

## Algorithms | Recursion | Question 2

Consider the following recursive function fun(x, y). What is the value of fun(4, 3) filter_none edit close play_arrow link brightness_4 code int fun(int x, int… Read More »

## Algorithms | Recursion | Question 9

Predict output of following program filter_none edit close play_arrow link brightness_4 code #include <stdio.h>    int fun(int n) {     if (n == 4)        return n;… Read More »