144k views
1 vote
Unless you explicitly initialize global variables, they are automatically initialized to

_________.

1 Answer

0 votes

Answer:

Zero(0)

Step-by-step explanation:

Global Variables

Variables which are declared outside any function. Any function can use these variables,they are automatically initialized to zero(0).They are generally declared before main() function.

Example- C program for showing global variable is 0.

#include <stdio.h>

int g; // declaring g as global variable

int main()

{

printf("%d",g); //printing global variable

return 0;

}

Output

0

User Dbajtr
by
5.3k points