Subject / 609 questions

Programming MCQs

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

Page 14 of 31

Question 262 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 274 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