Q55
What will be the output of the following C++ code? #include using namespace std; class A public: int a; A(int a=0) this->a = a; ; int main(int argc, char const *argv[]) A a1, a2(10); cout<<a2.a; return 0;
A.
010
AnswerB.
100
C.
001
D.
Error
Answer: Option A
Solution
Answer: Option A
No explanation is given for this question Let's Discuss on Board