ComputerObject Oriented Programming In C Plus PlusDifficulty: Medium
What will be the output of the following C++ code? #include <iostream> using namespace std; class A { int a; A() { a = 5;} }; int main() { A *obj = new A; cout << obj->a; }
Select the correct option to test your answer:
Correct Answer: Option C (Compile-time error)
Verified correct option for Computer (Object Oriented Programming In C Plus Plus).