Subject / 929 questions

Programming MCQs

Page 30 of Programming multiple-choice questions with answers. Tap an option to check yourself.

Page 30 of 47

Question 582 Data Structures

Which statement best distinguishes a static data structure from a dynamic one?

Correct answer A. A static structure has a size fixed when it is created, while a dynamic one can grow or shrink at run time

Open question
Advertisement
Advertisement
Question 594 Data Structures

Why does a dynamic array such as C++ std::vector achieve amortised O(1) time for appending elements?

Correct answer C. It grows its capacity geometrically, so expensive reallocations happen rarely

Open question
Advertisement