Gate2018 cs Q25

0. Consider the following C program:

 int counter = 0;
 int calc(int a, int b) {
  int c;
  counter++;
  if (b == 3)
    return (a * a * a);
 &emp;else {
  c = calc(a, b / 3);
  return (c * c * c);
  }
 }
 int main() {
  calc(4, 81);
  printf("%d", counter);
 }
 The output of this program is ________ .

Note – Numerical Type question.

Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *