Examveda

What will be the output of the following C code?
#include <stdio.h>
void main()
{
    register int x = 0;
    if (x < 2)
    {
        x++;
        main();
    }
}

A. Segmentation fault

B. main is called twice

C. main is called once

D. main is called thrice

Answer: Option A


This Question Belongs to C Program >> Function

Join The Discussion

Related Questions on Function