0% found this document useful (0 votes)
17 views

Question

oop and database question

Uploaded by

musannanafis
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Question

oop and database question

Uploaded by

musannanafis
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 5

1.Which of the following option best illustrates a friend class?

This class can access and manipulate all the private members of that class which
connects to a friend.

Friend class can only access and manipulate the protected data members of that
class that connects to a friend.

Friend class can't access any data member of another class but can use its methods

Friend class don't have any implementation

2. Which of following is shared structure of a set of similar objects

Encapsulation

A Class

Inheritance

None of Above

3. Which keyword is used to inherit a class or abstract class is?

extends

extend

implement

inherit

4. Which of the following is an abstract data type

Double

String

Int

Class

5.Which of the following is not related to OOPS?

Class and Object

Constructor and Destructor

Structure and Union

Inheritance and Polymorphism

6.Which Feature of OOP encourges the code reusability?

Polymorphism

Inheritance
Abstraction

Encapsulation

7. Which of the following feature is also known as run-time binding or late binding

Dynamic typing

Dynamic loading

Dynamic binding

Data hiding

8.Which among the following is not a member of the class?

Virtual function

const function

Static function

Friend function

9. Which of the following class is known as the generic class?

Final class

Template class

Abstract class

Efficient code

10. Which of the following OOP concept binds the code and data together and keeps
them secure from the outside world?

Polymorphism

Inheritance

Abstraction

Encapsulation

11. Which member of the superclass is never accessible to the subclass?

Public member

Protected member

Private member

All of the mentioned

12. What is the size of a class?

Sum of the size of all inherited variables along with the variables of the same
class

The size of the class is the largest size of the variable of the same class

Classes in the programming languages do not have any size

Sum of the size of all the variables within a class

13. Which class cannot create its instance?

Parent class

Nested class

Anonymous class

Abstract class

14. Which of the following statement of a program is not right?

class teacher{}; teacher s[5];

class teacher{}s;

class teacher{}; teacher s;

class teacher{}s[];

15. The object cannot be ?

passed by copy

passed as function

passed by value

passed by reference

16. Which of the following feature may be breaked if the user does not use the
classes in the code?

Object must be used violated

Only the encapsulation concept is violated

Inheritance cannot be implemented

Basically, all the features of OOPS get violated

17. The combination of abstraction of the data and code is viewed in

Inheritance

Object

Class

Interfaces
18. The principle of abstraction.

is used to achieve OOPS.

is used to avoid duplication

Use abstraction at its minimum

is used to remove longer codes

19. A constructor

May consist of a return type

Doesn't consist of any return type

Has some return type

Of a derived class has a return type

20. If in case, in multiple inheritances, a class R would inherit the Class Q,


while Class Q would inherit the class P, then in which sequence would their
destructors be called in case we declare an object of Class R?

-R() then -P() then -Q()

-P() then -Q() then -R()

-Q() then -R() then -P()

-R() then -Q() then -P()

21. The memory that is allocated for any objects is

Cache

HDD

ROM

RAM

22. Hierarchical inheritance could be some subset of inheritance.

Multilevel

Single level

Multiple

Hybrid

23. What is the name of the feature in which we enforce the definitions of the
abstract function at the compile time?

Dynamic Polymorphism

Static Polymorphism
Dynamic or Static Polymorphism according to need

Polymorphism

24. Which of following doesnot have a body?


An interface
A class
An Abstract Method
none of above

25. in oop, public,private and protected are


classes
Access modifiers
Interfaces
Method signature

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy