Solved

It Is Valid to Initialize Member Variables in a Class

Question 10

True/False

It is valid to initialize member variables in a class on the same line in which the variable is declared.For example,the following sets xx to 1000:
class A
{
public:
A(){}
private:
int xx = 1000;
};

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents