🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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?

  1. A.Creates a new int called count and sets it to 0
  2. B.Declares that count is defined somewhere else, without creating it
  3. C.Makes count private to this file
  4. 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 →