Recall & Review
beginner Click to reveal answer
What problem do arrays solve in programming?
Arrays solve the problem of storing multiple values of the same type in a single, organized structure that allows easy access by position (index).
beginner Click to reveal answer
How does an array improve data management compared to using separate variables?
An array groups related data together, making it easier to manage, loop through, and access by index instead of handling many separate variables.
intermediate Click to reveal answer
Why is accessing elements by index in an array efficient?
Because arrays store elements in contiguous memory locations, the program can calculate the exact position of any element quickly using its index.
beginner Click to reveal answer
What is a real-life analogy for an array?
An array is like a row of mailboxes where each mailbox has a number (index), and you can quickly find the mail in any mailbox by its number.
intermediate Click to reveal answer
What limitation do arrays have that programmers should be aware of?
Arrays have a fixed size once created, so you cannot easily add or remove elements without creating a new array.
What is the main reason arrays are used in programming?
✗ Incorrect
Arrays store multiple values of the same type in order, allowing easy access by index.
How do arrays store their elements in memory?
✗ Incorrect
Arrays store elements in contiguous memory locations, which allows fast access by index.
What happens if you try to add more elements than the size of an array?
✗ Incorrect
Arrays have fixed size; to add more elements, you must create a new larger array.
Which of these is a benefit of using arrays?
✗ Incorrect
Arrays allow quick access to elements by their index position.
What is a simple real-life example to understand arrays?
✗ Incorrect
A bookshelf with numbered slots is like an array where each slot holds one item and has a fixed position.
Explain why arrays are useful and what problem they solve in simple terms.
Think about how you keep similar items in one place for easy use.
You got /4 concepts.
Describe the limitation of arrays and how it affects adding or removing elements.
Consider what happens if you want to put more items than the array can hold.
You got /3 concepts.
