Home / Object Oriented Paradigm MCQs WIth Answers For NTS PPSC FPSC

Object Oriented Paradigm MCQs WIth Answers For NTS PPSC FPSC


Most of the students wants to get the idea of Object Oriented Paradigm MCQs WIth Answers For NTS PPSC FPSC because they knew that technology related mcqs are important to get the information and explore new way indeed. Every question is going to make sure about the Object Oriented Paradigm MCQs with answers for NTS test questions. It makes the direct way out to remain intact about the Object Oriented Paradigm MCQs WIth Answers For FPSC reputed questions wise perception. It makes developed way out to remain intact with respect to the Object Oriented Paradigm MCQs WIth Answers For PPSC as well. So these below given question are considered as general questions applied to anyone indeed.

Object Oriented Paradigm MCQs WIth Answers For NTS PPSC FPSC

Question 1: . If A Function In Java Is Declared Private Then It __________________.
a. Can’t Access The Standard Output
b. Can Access The Standard Output
c. Can’t Access Any Output Stream
d. Can Access Only The Output Streams

Show Answer

Can Access The Standard Output

Question 2: Can Main() Function Be Made Private?
a. Yes, Always
b. Yes, If Program Doesn’t Contain Any Classes
c. No, Because Main Function Is User Defined
d. No, Never

Show Answer

No, Never

Question 3: Which Error Will Be Produced If Private Members Are Accessed?
a. Can’t Access Private Message
b. Code Unreachable
c. Core Dumped
d. Bad Code

Show Answer

Can’t Access Private Message

Question 4: A Private Function Of A Derived Class Can Be Accessed By The Parent Class.
a. True
b. False

Show Answer

False

Question 5: If Private Members Are To Be Called Outside The Class, Which Is A Good Alternative?
a. Call A Public Member Function Which Calls Private Function
b. Call A Private Member Function Which Calls Private Function
c. Call A Protected Member Function Which Calls Private Function
d. Not Possible

Show Answer

Call A Public Member Function Which Calls Private Function

Question 6: Which Function Among The Following Can’t Be Accessed Outside The Class In Java In Same Package?
a. Public Void Show()
b. Void Show()
c. Protected Show()
d. Static Void Show()

Show Answer

Protected Show()

Question 7: Private Member Functions ____________.
a. Can’t Be Called From Enclosing Class
b. Can Be Accessed From Enclosing Class
c. Can Be Accessed Only If Nested Class Is Private
d. Can Be Accessed Only If Nested Class Is Public

Show Answer

Can’t Be Called From Enclosing Class

Question 8: How To Access A Private Member Function Of A Class?
a. Using Object Of Class
b. Using Object Pointer
c. Using Address Of Member Function
d. Using Class Address

Show Answer

Using Address Of Member Function

Question 9: How Many Private Member Functions Are Allowed In A Class ?
a. Only 1
b. Only 7
c. Only 225
d. As Many As Required

Show Answer

As Many As Required

Question 10: In Java, Which Rule Must Be Followed?
a. Keyword Private Preceding List Of Private Member’s
b. Keyword Private With A Colon Before List Of Private Member’s
c. Keyword Private With Arrow Before Each Private Member
d. Keyword Private Preceding Each Private Member

Show Answer

Keyword Private Preceding Each Private Member

Question 11: If Private Member Functions Are To Be Declared In C++ Then _____________.
a. Private:
b. Private
c. Private(Private Member List)
d. Private :- <Private Members>

Show Answer

Private

Question 12: Which Syntax Among The Following Shows That A Member Is Private In A Class?
a. Private: Functionname(Parameters)
b. Private(Functionname(Parameters))
c. Private Functionname(Parameters)
d. Private::Functionname(Parameters)

Show Answer

Private Functionname(Parameters)

Question 13: Which Member Can Never Be Accessed By Inherited Classes?
a. Private Member Function
b. Public Member Function
c. Protected Member Function
d. All Can Be Accessed

Show Answer

Private Member Function

Question 14: Which Among The Following Is True?
a. The Private Members Can’t Be Accessed By Public Members Of The Class
b. The Private Members Can Be Accessed By Public Members Of The Class
c. The Private Members Can Be Accessed Only By The Private Members Of The Class
d. The Private Members Can’t Be Accessed By The Protected Members Of The Class

Show Answer

The Private Members Can Be Accessed By Public Members Of The Class

Question 15: Which Is Private Member Functions Access Scope?
a. Member Functions Which Can Only Be Used Within The Class
b. Member Functions Which Can Used Outside The Class
c. Member Functions Which Are Accessible In Derived Class
d. Member Functions Which Can’t Be Accessed Inside The Class

Show Answer

Member Functions Which Can Only Be Used Within The Class
Rate this post