Examveda
Examveda

What will be the output of the following C code?
#include <stdio.h>
int i;
int main()
{
    extern int i;
    if (i == 0)
        printf("scope rules\n");
}

A. scope rules

B. Compile time error due to multiple declaration

C. Compile time error due to not defining type in statement extern i

D. Nothing will be printed as value of i is not zero because i is an automatic variable

Answer: Option A


This Question Belongs to C Program >> Function

Join The Discussion

Related Questions on Function