Podcast
Questions and Answers
Which access modifier allows a class member to be accessed from any function or class?
Which access modifier allows a class member to be accessed from any function or class?
- Private
- Public (correct)
- Protected
- Internal
What is the purpose of a destructor in object-oriented programming?
What is the purpose of a destructor in object-oriented programming?
- Creating a new instance of a class
- Defining the attributes of a class
- Freeing the resources before the object is destroyed (correct)
- Enabling inheritance between classes
What does function overloading in C++ refer to?
What does function overloading in C++ refer to?
- Using functions from different classes interchangeably
- Defining multiple functions with the same name but different parameters (correct)
- Creating functions with an excessive number of parameters
- Restricting the use of functions within specific classes