C - Data Types - Discussion

You Are Here :: Home > C > Data Types - Discussion

 



Q.

extern int i; //Declaring the variable i.

int i=25; //Initializing the variable.
extern int i; //Again declaring the variable i.
#include
int main(){
extern int i; //Again declaring the variable i.
printf("%d",i);
return 0;
}

A. 0 B. 2
C. 25 D. error

Answer: Option C
Explaination:

A particular extern variable can be declared many times but we can initialize at only one time.



Discussion

Your Comments Goes here...
NameDiscussion