- A Class is __________ .
- The __________ of a class is used to initialize object of that class type.
- Class member attributes can be accessed with the __________ operator.
- If not user-defined constructor are provided for a class, C++ will automatically generate a __________ constructor.
- __________ and __________ determine the access allowed to class members.
- The copy semantics provided by the default C++ Copy Constructor is __________ .
- __________ are associated with the C++ Move Constructor.
- The class __________ is called when an object goes out of scope.
- What does the following code display?
#include <iostream>
using namespace std;
class Test{
private:
int num;
void increment_num() {
num++;
}
public:
Test(int num) : num{num} {}
};
int main() {
Test object{100};
cout << object.increment_num() << endl;
return 0;
}
- Given the following class declaration, which statment is NOT true?
class Test{
private:
int num;
void increment_num() {
num++;
}
public:
Test(int num) : num{num} {}
void decrement_num() {
num--;
}
};