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 functions does C provide for dynamic memory allocation?

  1. new and delete

  2. malloc() and free()

  3. alloc() and dealloc()

  4. create() and destory()

The correct answer is: malloc() and free()

C provides the functions malloc() and free() for dynamic memory allocation, not new and delete (which are related to C++). Option C suggests functions called alloc() and dealloc(), but those do not exist in C. Option D includes functions create() and destroy(), which are also not valid function names in C. Thus, the correct answer is B.