Complete the code to declare an external variable.
extern int [1];The keyword extern declares a variable defined in another file or scope. Here, count is the external variable name.
Complete the code to define the external variable declared elsewhere.
int [1] = 10;
extern keyword when defining the variable.The variable count is defined here with an initial value. It matches the external declaration.
Fix the error in the code to correctly use the external variable.
extern int [1]; void printCount() { printf("Count is %d\n", [1]); }
The variable count must be used consistently as the external variable name.
Fill both blanks to declare and initialize an external variable correctly.
extern [1] [2]; // Defined in another file
The external variable count is declared as type int.
Fill all three blanks to define and use an external variable properly.
int [1] = 5; extern int [2]; void display() { printf("Value: %d\n", [3]); }
The variable total is defined, count is declared external and used in the function.
