what should be the output??

int i=1;
rec(int i) {
if(i<=3){
for(c=0;c<=5-i;c++) {
printf("%d\n",c);
rec(i+1);
}
}
}

0
1
2
3
4
5

4 times

0
0
0
1
2
1
0
1
2
2
0
1
2
3
0
1
2
1
0
0
1
2
1
0
1
2
2
0
1
2
3
0
1
2
2
0
0
1
2
1
0
1
2
2
0
1
2
3
0
1
2
3
0
0
1
2
1
0
1
2
2
0
1
2
3
0
1
2
4
0
0
1
2
1
0
1
2
2
0
1
2
3
0
1
2

1 Like

@ lovi I think this discussion is for discussing real problems…Not for such irrelevant questions…
As betlista said I will also say “U CAN COMPILE AND TEST URSELF”…

1 Like

wrng sandeep… nt so.

why are you asking? You cannot just compile and test it? or I missed something?

2 Likes

betlista ,wht is your facebook id … i9 want a connection f u… bt w mine … prmrs111@live.com

I’m not using FB very often - http://www.facebook.com/betlista :wink:

what will be the o/p when we define c locally in rec function…
… and y so…