GATE Computer Science (CS) 2018 Shift 1 Solved Paper

© examsiri.com
Question : 34 of 65
 
Marks: +1, -0
Consider the following C program :
#include
int calc (int a, int b) {
int c;
counter ++;
if (b = = 3) return (a*a*a);
else {
c = calc (a, b/3);
return (c*c*c);
}
}
int main () {
calc(4, 81);
printf(“%d%d”, counter);
}

The output of this program is ________
  • Your Answer:
Go to Question: