🎙 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 7 of 15

What is the default value of an uninitialised auto (local) int?

What is the default value of an uninitialised auto (local) int?

  1. A.0
  2. B.-1
  3. C.1
  4. D.Garbage — an unpredictable value
Answer & explanation

Correct answer: Garbage — an unpredictable value

Only static and global variables are set to 0 automatically. Locals must be initialised by you.

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 →