MCQs > IT & Programming > C++ > What would the following program print? class Printer{ public: Printer(std::string name) {std::cout << name;} }; class Container{ public: Container() : b('b'), a('a') {} Printer a; Printer b; }; int main(){ Container c; return 0; }

C++ MCQs

What would the following program print? class Printer{ public: Printer(std::string name) {std::cout << name;} }; class Container{ public: Container() : b("b"), a("a") {} Printer a; Printer b; }; int main(){ Container c; return 0; }

Answer

Correct Answer: Always

Explanation:

Note: This Question is unanswered, help us to find answer for this one

C++ Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

C++ Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it