← Quiz: Storage Classes in C: all 15 questions
Quiz: Storage Classes in C · Question 3 of 15
What does extern int count; do?
What does extern int count; do?
- A.Creates a new int called count and sets it to 0
- B.Declares that count is defined somewhere else, without creating it
- C.Makes count private to this file
- D.Stores count in a CPU register
Answer & explanation
Correct answer: Declares that count is defined somewhere else, without creating it
extern is a declaration only. The memory comes from exactly one definition such as int count = 0; in some file.
Can you get the rest right without peeking?
Take the timed Quiz: Storage Classes in C quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →