Mastering C++: A Comprehensive Quiz Based on 'Thinking in C++'

Disable ads (and more) with a membership for a one time $2.99 payment

Test your C++ skills with our quiz based on Bruce Eckel's 'Thinking in C++'. Dive into object-oriented programming, advanced topics, and fundamentals. Perfect for learners and experts alike. Assess your knowledge and become a C++ master!

Each practice test/flash card set has 50 randomly selected questions from a bank of over 500. You'll get a new set of questions each time!

Practice this question and more.


Which programming approach relies on creating a huge global array for storage?

  1. C++

  2. Java

  3. C

  4. Python

The correct answer is: C

C programming approach relies on creating a huge global array for storage because it uses static memory allocation, where the full size of the array is allocated at the time of compilation. This means the array has to be declared as a global variable and its size cannot be changed during runtime. This approach is not ideal in modern programming as it can lead to memory wastage and potential program crashes. A, B, and D options all use dynamic memory allocation, meaning arrays and other data structures can be created and resized during program execution, making them more flexible and efficient. Therefore, they do not rely on creating a huge global array for storage.