Technical Discussion :: C
Home > Technical Interview Q&A > C > Discussion
16 / 123
What is scope & storage allocation of extern and global variables?
Answer:
Scope: it defines the life time of a variable depends on declaration of a variable.If it is declared inside the variable it is local variable,If it is outside it is global variable.
Extern variables: belong to the External storage class and are stored in the main memory
Asked In ::
Sravan
23 Feb, 2019 5:07 AM
Scope: it defines the life time of a variable depends on declaration of a variable.If it is declared inside the variable it is local variable,If it is outside it is global variable.
Extern variables: belong to the External storage class and are stored in the main memory
Extern variables: belong to the External storage class and are stored in the main memory