Object Oriented Programming MCQs

Page No. 8

Using encapsulation data security is ___________


aNot ensured


bEnsured to some extent


cPurely ensured


dVery low



Encapsulation is the way to add functions in a user defined structure.


aTrue


bFalse


cA & B


d None of these


View Answer False

Which among the following can be a concept against encapsulation rules?


aUsing function pointers


bUsing char* string pointer to be passed to non-member function


cUsing object array


dUsing any kind of pointer/array address in passing to another function



Which among the following would destroy the encapsulation mechanism if it was allowed in programming?


aUsing access declaration for private members of base class


bUsing access declaration for public members of base class


cUsing access declaration for local variable of main() function


dUsing access declaration for global variables



Which among the following violates the principle of encapsulation almost always?


aLocal variables


bGlobal variables


cPublic variables


d Array variables


View Answer Global variables

How can Encapsulation be achieved?


aUsing Access Specifiers


bUsing only private members


cUsing inheritance


dUsing Abstraction



Which among the following should be encapsulated?


aThe data which is prone to change is near future


bThe data prone to change in long terms


cThe data which is intended to be changed


dThe data which belongs to some other class



Encapsulation helps in writing ___________ classes in java.


aMutable


b) Abstract


cWrapper


dImmutable


View Answer Immutable

Find which of the following uses encapsulation?


avoid main(){ int a; void fun( int a=10; cout<


bclass student{ int a; public: int b;};


cclass student{int a; public: void disp( ){ cout<


dstruct topper{ char name[10]; public : int marks; }



Which feature can be implemented using encapsulation?


aInheritance


bAbstraction


cPolymorphism


dOverloading


View Answer Abstraction

Goto Page No.

Page 8 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