+ 1
What will be the output of following code for n=7
int f(int n) { if(n==0) return 0; else return f(n/2)*10+n%2; }
2 Answers
0
This code will not give you any results because it is poorly written.
0
The question is not wrong.It is a Recursive method