English
Tamil Nadu Board of Secondary EducationHSC Science Class 11

Class x{ int y; public: x(int z){y=z;} } x1[4];int main(){ x x2(10);return 0;} How many objects are created for the above program? - Computer Science

Advertisements
Advertisements

Question

class x
{
   int y;
   public:
   x(int z){y=z;} } x1[4];
int main()
{ x x2(10);
return 0;}

How many objects are created for the above program?

Options

  • 10

  • 14

  • 5

  • 2

MCQ

Solution

5

shaalaa.com
Creating Objects
  Is there an error in this question or solution?
Chapter 14: Classes and objects - Evaluation - Section – A [Page 246]

APPEARS IN

Samacheer Kalvi Computer Science [English] Class 11 TN Board
Chapter 14 Classes and objects
Evaluation - Section – A | Q 6. | Page 246
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×