Multiple choice

Which of the following is absent in C and later is introduced in C++ for the purpose of memory management?

  1. Functions

  2. Classes

  3. Pointers

  4. Structures

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

C++ introduced classes to support object-oriented programming and improve memory management. Classes provide constructors and destructors that automatically handle resource allocation and deallocation, unlike C's manual approach.