Friday, 27 May 2016

Guess the output of this recursion problem.

#include"iostream"
using namespace std;
void func(int bool)
{
if(!bool)
return 0;
cout<<bool;
func(!bool);
cout<<bool;
}

int main()
{
func(123);
}

What is the output?
1. 123123
2, 123
3. Stack Overflow
4. 0

#cprogramming #cpluplus #cprogramming #recursion

No comments: