Object Oriented Programming Using C++ - Section 2 Multiple Questions and Answers.




26.What is scope of a class nested inside another class?
A. Protected scope
B. Private scope
C. Global scope
D. Depends on access specifier and inheritance used

27.Which syntax for class definition is wrong?
A. class student{ student(int a){} };
B. student class{ };
C. class student{ public: student(int a){ } };
D. class student{ student(int a){} };

28.Which of the following pairs are similar?
A. Class and object
B. Class and structure
C. Structure and object
D. Structure and functions

29.How members of an object are accessed?
A. Using dot operator/period symbol
B. Using scope resolution operator
C. Using member names directly
D. Using pointer only

30.Which among the following is correct?
A. class student{ }s1,s2; s1.student()=s2.student();
B. class student{ }s1; class topper{ }t1; s1=t1;
C. class student{ }s1,s2; s1=s2;
D. class student{ }s1; class topper{ }t1; s1.student()=s2.topper();

«»



Date to Date Current Affairs 2022

PakMCQs.net

Quick Links

GAT Subject



   Computer Science    English Mcqs    Agriculture    

Engineering



   Computer Science    Civil Engineering    

Technical



   Networking    Electronics    Database    

Past Papers



   Model Papers    FPSC Papers