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




16. The prototypes for friend functions are most often listed in the:
A. private declaration section
B. public declaration section
C. implementation section
D. none of these

17.If My Class is a friend of Your-Class, which is true?
A. Your Class is a friend of My Class
B. Your Class is not a friend of MY Class
C. Your c!ass may or may not be a friend of My Class
D. Your Class cannot be a friend of My Class.

18. Without overloading of the + operator:
A. addition could not be performed on built-in types
B. addition could not be performed on class objectsv
C. class objects could not be added to one another
D. programs would be harder to read and understand.

19.Which of the following operators may be overloaded?
A. .(Member)
B. ::(scope resolution)
C. %(Modulus)
D. ?:(conditional)

20.To perform multiple arithmetic operations in a single statement, overloaded operator functions should return:
A. void
B. a copy of the values passed to them
C. an object of the class type
D. address of the function

«»



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