--:--









Quiz for Scope and lifetime of variables extern

Course: C Language | Subject: Unit 4 | Topic: Functions in C



Logo

Q1: What is the primary purpose of the extern keyword in C?

Logo

Q2: Where is an extern variable typically stored?

Logo

Q3: What is the lifetime of an extern variable in C?

Logo

Q4: Which of the following is true about extern variables?

Logo

Q5: Can extern variables be initialized inside a function?

Logo

Q6: What happens if you declare a variable with extern but do not define it anywhere?

Logo

Q7: Which storage class must be used with extern variables?

Logo

Q8: Can an extern variable be accessed in multiple source files?

Logo

Q9: Where is the definition of an extern variable placed?

Logo

Q10: What is the default value of an uninitialized extern variable?

Logo

Q11: What is the correct way to declare an extern integer variable?

Logo

Q12: When should extern be used in C?

Logo

Q13: Can extern variables be declared inside a block?

Logo

Q14: What is the scope of an extern variable?

Logo

Q15: What is the difference between extern and static variables in C?

Logo

Q16: Do extern variables occupy memory?

Logo

Q17: Which keyword is used to declare a variable in another file?

Logo

Q18: If a variable is declared extern multiple times in different files, how many copies are created?

Logo

Q19: Which section of memory holds extern variables?

Logo

Q20: Can an extern variable be constant?

Are you ready to start test? Set your time limit