C storage Classes and Type Qualifiers | Q - 7

Last Updated :
Discuss
Comments

What will be the output of the following code?

C
#include <stdio.h>

int x = 10;

void print() {
    extern int x;
    printf("%d\n", x);
}

int main() {
    print();
    return 0;
}


10

Garbage Value

Compilation Error

0

Tags:
Share your thoughts in the comments