A

Admin • 833K Points
Coach

Q. Assuming int size is 4 bytes, what is going to happen when we compile and run the following program?

Code:
#include “stdio.h”
int main()
{
printf(“GeeksQuizn”);
main();
return 0;
}
  • (A) We can’t use main() inside main() and compiler will catch it by showing compiler error.
  • (B) GeeksQuiz would be printed in 2147483647 times i.e. (2 to the power 31) - 1.
  • (C) It’ll print GeeksQuiz infinite times i.e. the program will continue to run forever until it’s terminated by other means such as CTRL+C or CTRL+Z etc.
  • (D) GeeksQuiz would be printed until stack overflow happens for this program.
  • Correct Answer - Option(D)
  • Views: 18
  • Filed under category C Programming
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.