Object Oriented Programming MCQs

Page No. 2

Which is not feature of OOP in general definitions?


aCode reusability

✖


bModularity

✖


cDuplicate/Redundant data

✓


dEfficient Code

✖



What is the additional feature in classes that was not in structures?


aData members

✖


bMember functions

✓


cStatic data allowed

✖


d Public access specifier

✖


View Answer Member functions

Who invented OOP?


aAlan Kay

✓


bAndrea Ferro

✖


cDennis Ritchie

✖


dAdele Goldberg

✖


View Answer Alan Kay

Which of the following best defines a class?


aParent of an object

✖


bInstance of an object

✖


cBlueprint of an object

✓


dScope of an object

✖



Which was the first purely object oriented programming language developed?


aJava

✖


bC++

✖


cSmallTalk

✓


dKotlin

✖


View Answer SmallTalk

Instance of which type of class can’t be created?


aAnonymous class

✖


bNested class

✖


cParent class

✖


dAbstract class

✓


View Answer Abstract class

Which among the following is false for class features?


aClasses may/may not have both data members and member functions

✖


bClass definition must be ended with a colon

✓


c Class can have only member functions with no data members

✖


dClass is similar to union and structures

✖



Which of the following pairs are similar?


a Class and object

✖


bClass and structure

✓


cStructure and object

✖


d Structure and functions

✖


View Answer Class and structure

Which syntax for class definition is wrong?


aclass student{ };

✖


b student class{ };

✓


c class student{ public: student(int a){ } };

✖


dclass student{ student(int a){} };

✖


View Answer student class{ };

Which among the following is false, for a member function of a class?


aAll member functions must be defined

✖


bMember functions can be defined inside or outside the class body

✖


cMember functions need not be declared inside the class definition

✓


dMember functions can be made friend to another class using the friend keyword

✖



Goto Page No.

Page 2 of 93

Alphabetical MCQs Categories
—

Here below You find all kind of categories of MCQs in alphabetical order.


"Comprehensive Collection of MCQs: Alphabetically Organized by Subject"
—

"Discover an extensive collection of multiple-choice questions (MCQs) neatly categorized by subject from A to Z. This resource is designed for anyone eager to explore various topics in a straightforward and organized manner. Whether you're a student preparing for exams, an educator seeking supplementary materials, or simply curious about different subjects, this compilation offers a convenient way to learn and assess your knowledge. With questions arranged alphabetically, navigation is effortless, allowing you to delve into subjects of interest at your own pace. Engage, learn, and expand your understanding with this accessible and comprehensive repository of MCQs!"


BolPakistan

bolpakistan.com.pk includes Job Mcqs and Pak Mcqs is the Top Largest Mcqs Forum in World, in which you can read Mcqs of All Subjects, PPSC test preparation, FPSC, NTS and PPSC PAST PAPERS, PPSC PAST MCQS. A Collection of Repeated MCQs for JOBs seekers.

Copyright © 2024, Designed & Developed by BolPakistan