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:
Verified
Q5: A local class and a nested class
Q7: The set of integers ranging from -MAXINT
Q7: If v is a vector and i
Q8: A class may not have another class
Q9: A constructor is always named construct with
Q11: A static variable of a class cannot
Q12: The keyword static is used in a
Q13: size and capacity of a vector are
Q14: The functions or data members declared in
Q15: Any use of the keyword const is
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents