Assume this program is compiled as standard C and runs on a conventional…

Assume this program is compiled as standard C and runs on a conventional implementation with a finite call stack and without tail-call elimination. How many times will main() be called?

#include <stdio.h>

int main(void)
{
    printf("\nmain called again");
    main();
}
  1. A.

    error

  2. B.

    infinite time

  3. C.

    65535 times

  4. D.

    till stack overflows

Attempted by 182 students.

Sign up free to check your answer

Sign up free

Explore the full course: Isro

Loading lesson…