MCQs>IT & Programming>Programming With C>What would be printed on the standard output as a result of the following code snippet? int Recur(int num) { if(num==1 || num==0) return 1; if(num%2==0) return Recur(num/2)+2; else return Recur(num-1)+3; } int main() { int a=9; printf('%d\n', Recur(a)); return 0; }
Programming With C MCQs
What would be printed on the standard output as a result of the following code snippet? int Recur(int num) { if(num==1 || num==0) return 1; if(num%2==0) return Recur(num/2)+2; else return Recur(num-1)+3; }
int main() { int a=9; printf("%d\n", Recur(a)); return 0; }
Answer
Correct Answer: 10
Explanation:
Note: This Question is unanswered, help us to find answer for this one