Home » C Programming » Variables » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    void main()
    {
    register int num = 10;
    if (num < 12)
    {
    num++;
    main();
    }
    }
    1. main is called once
    2. Segmentation fault
    3. main is called thrice
    4. main is called twice
    5. None of these
Correct Option: B

Segmentation fault



Your comments will be displayed only after manual approval.