MCQs>IT & Programming>C++>Output of the following C++ code ? #include class A { int a; public: void foo() {std::cout<<'foo';} }; int main() { A* trial=nullptr; trial->foo(); }
C++ MCQs
What will be the output of the following C++ code ? #include class A { int a; public: void foo() {std::cout<<"foo";} }; int main() { A* trial=nullptr; trial->foo(); }
Answer
Correct Answer: foo
Explanation:
Note: This Question is unanswered, help us to find answer for this one