Question: )(3pts) Multiple choice questions: circle oneansweronlyi. Given classCat{ intage; intweight; }; thencout < < sizeof( Cat); will output [a] 20[b] 12[c] 8[d] 4ii. The difference
)(3pts) Multiple choice questions: circle oneansweronlyi. Given classCat{ intage; intweight; }; thencout << sizeof( Cat); will output [a] 20[b] 12[c] 8[d] 4ii. The difference between structand classis that[a] by default member variables/ functions are privatein struct, publicin class.[b] by default member variables/ functionsare public in struct, private in class.[c] there are nomember functions allowedin struct.[d] there is no difference at all.iii. What will be the output of the following code?#include classrect {intx, y;public:voidset(inta, intb) { x= a; y= b; }intarea() const{ returnx* y; }};intmain() {rectrect;rect.set(3, 4);std::cout<< "rect\'s area: "<< rect.area();return0;}[a] rects area: 12[b] rects area: 24[c] rects area: 64[d] compile error because rect is used as class name and varialbe name in main()iv. Which operator does a pointerobject of a class use to access its members? [a] . (dot)[b]:(colon)[c]:(colon colon)[d]->(arrow)v. How many member functions are there in this class excluding the freely generated ones? classbox{intcapacity;public:voidprint( ) const;boolcompare( );friend voidshow();friend boollost();};[c]4[d]3[b]2[a] 1vi. What is operator overloading in C++?[a] overriding the operator meaning by the user defined meaning for user defined data type[b] redefining the way operator works for user defined data type[c] ability to provide the operators with some special meaning for user defined data type[d] all of the abovePage 2of 32)(4pts) Code tracing: given Cat class def, its member function implementations, and driver code as follows. Run the main( ) driver code on the paper or in your brain, what are the output? For each line of output, briefly explain reason why it is printed. NOTE: Do not run it in your compiler!classCat {intm_Age, m_Weight;charm_Color;public:Cat();Cat(constCat& rhs);Cat(inta, intw, charc);~Cat() { cout<< "Dtor. ";}intgetAge( ) { returnm_Age; }intgetWeight( ) {returnm_Weight; };voidset(inta, intw, charc);};Cat::Cat():m_Age(1), m_Weight(3), m_Color('B') {cout<< "Default ctor. ";}Cat::Cat(constCat& rhs):m_Age(rhs.m_Age), m_Weight(rhs.m_Weight), m_Color(rhs.m_Color) {cout<< "Copy ctor. ";}Cat::Cat(inta, intw, charc):m_Age(a), m_Weight(w), m_Color(c) {cout<< "3 parameter ctor. ";}voidCat::set(inta, intw, charc) {m_Age= a;m_Weight= w;m_Color= c;}voiddisplay(Catx) {cout<< x.getAge() << endl;cout<< x.getWeight() << endl;}intmain( ){cout<< "The size of a Cat is: "<< sizeof( Cat) << endl;Catx[2];{CatSugi;display(Sugi);cout<< "About to exit this block. ";}CatFrisky(2, 6, 'W');x[0].set( 3, 8, 'P');cout<< "Cat x[0] is "<< x[0].getAge( ) << " yrs old";cout<< " and weighs "<< x[0].getWeight( ) << " lb. ";cout<< "Frisky is "<< Frisky.getAge( ) << " yrs old";cout<< " and weighs "<< Frisky.getWeight( ) << " lb. ";return0;}Ans: Page 3of 33)(3 pts) Templates: define a class template called MyPairwhich serves to store two elements of any valid type. For example, if we wanted to declare an object of this class to store two integer values with the values of 103 and 46 we would write: MyPair myObj1(103, 46); The same class could also be used to create an object to store any other type, suchas MyPair myObj2(Hello, There); Here arethe specifics: The class template MyPairhas two private member variables aand bof generic (templated) type. MyPairhas following public member functions: a constructor which takes two parameters of the generic type, getMax()function which returns the maximal of the two elements, getMin()function which returns the minimal of the two elements. Questions:Define MyPairclass template, and implement the constructor and getMax()member function. Ans: