MCQs > IT & Programming > C++ > Answer the question that follows. class Outer { public: class Inner { int Count; public: Inner(){}; }; }; int main() { Inner innerObject; Outer outObject; return 0; } What will be the result when the above code is compiled?

C++ MCQs

Consider the sample code given below and answer the question that follows.

 class Outer
 {
   public:
     class Inner
       {
         int Count;
         public:
         Inner(){};
       };
 };
 int main()
   {
 Inner innerObject;
 Outer outObject;
 return 0;
   }

 What will be the result when the above code is compiled?

Answer

Correct Answer: There will be an error because in the declaration of innerObject the type Inner must be qualified by Outer

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