Question 10
Back to Exercise
After int a[5] = {1}; inside a function, what is a[3]?
- A 1
- B 0 Correct
- C Garbage
- D It does not compile
Correct Answer: Option B
Once an aggregate has an initializer, every element not explicitly initialised is set to zero – also for local arrays.
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!