XOOPS/OOPs MCQs Set 1 Sample Test,Sample questions

Question:
 A static member function can be called using the ____ name.

1.Class name

2.Object name

3.both (a) and (b)

4.None of these


Question:
A non-member function cannot access which data of the class?

1.Private data

2.Public data

3.Protected data

4.All of the above


Question:
A ____ diagram describes how a particular set of objects relate to each other.


1.Class diagram

2.Instance diagram

3.both (a) and (b)

4.None of these


Question:
A ____ diagram is a schema or pattern for describing many possible instances of data.

1.Class diagram

2.Instance diagram

3.both (a) and (b)

4.None of these


Question:
A _____ is a mechanism for converting values of various types into a sequence of characters.




1.istream

2.ios

3.ostream

4.iostream


Question:
A _____ object gets its memory allocated at runtime.

1.Static objects

2.Dynamic objects

3.both (a) and (b)

4.None of these


Question:
A _____ object is an object which has the scope of an automatic object but the lifetime of an external object.

1.Static objects

2.Dynamic objects

3.External objects

4.Automatic objects


Question:
A _____ object is visible throughout a program module.




1.Static objects

2.Dynamic objects

3.External objects

4.Automatic objects


Question:
A _____ object which exists for a particular period.


1.Static objects

2.Dynamic objects

3.External objects

4.Automatic objects


Question:
An object cannot invoke a private function using the dot operator?

1.True

2.False

3.Error

4.None of these


Question:
An object that groups together operations that are all used by some superior level of control or operations that all use some junior-level set of operations is which type of abstraction?

1.Action Abstraction

2.Virtual Machine Abstraction

3.Coincidental Abstraction

4. Entity Abstraction


Question:
An object that packages a set of operations that have no relations to each other is which type of abstraction?

1.Action Abstraction

2.Virtual Machine Abstraction

3.Coincidental Abstraction

4.Entity Abstraction


Question:
An object that provides a general set of operations, all of which perform the same kind of function is which type of abstraction?

1.Action Abstraction

2.Virtual Machine Abstraction

3.Coincidental Abstraction

4.Entity Abstraction


Question:
An object that represents a useful model of a problem domain is which type of abstraction?



1.Action Abstraction

2.Virtual Machine Abstraction

3.Coincidental Abstraction

4.Entity Abstraction


Question:
How many types of abstractions are there in an object-oriented programming language?

1.2 types

2.3 types

3.4 types

4.None of These


Question:
How many types of object diagrams are there?

1.2 types

2.3 types

3.4 types

4.None


Question:
Object-oriented languages follow which approach?

1.Top-down approach

2.Bottom-up approach

3.both (a) and (b)

4.None of these


Question:
Objects are the variables of the type ____?

1.String

2.Boolean

3.Class

4.All data types can be included


Question:
Procedure-oriented languages follow which approach?

1.Top-down approach

2.Bottom-up approach

3.both (a) and (b)

4.None of these


Question:
The subroutines contained in an object are called _____ methods.

1.Class Methods

2.Static Methods

3.Instance Methods

4.Interface Methods


Question:
To access manipulators the file ____ should be included in the program.

1.iomanip

2.ios

3.#include

4.None


Question:
Under which pillar of OOPS do base class and derived class relationships come?

1.Abstraction

2.Encapsulation

3.Inheritance

4.Polymorphism


Question:
What are auto variables?

1.Auto variables are the variables that are visible to all the modules of a program

2.Auto variables are the variables that speed up the allocation of the CPU

3.Auto variables are the variables that are defined inside a function

4.Auto variables are the variables whose scope is limited


Question:
What are manipulators?

1.What are manipulators? Manipulators are used to specify a character that is used to fill the unused portion of the field

2.Manipulators are used to clear the flags specified

3.Manipulators are special functions that can be included in the I/O statements to alter the format parameters of a stream

4.Manipulators contain large numbers of member functions


Question:
What are Static variables?

1.Static variables are the variables that are visible in specific functions

2.Static variables are the variables that speed up the allocation of the CPU

3.Static variables are the variables that are defined within a function and retain their values from the previous call

4.All the variables are static variables by default


Question:
What is a parameterized class?

1.A parameterized class is a class that denotes a family of classes whose structure and behavior are defined independently of its formal class parameter

2.A parameterized class is a class that uses the concept of a Meta class

3.A parameterized class is a class of a class

4.None of these


Question:
What is ios stream class?

1.ios stream class contains a pointer to a buffer object

2.ios stream class inherits the properties of ios

3.ios stream contains overloaded insertion operator<<

4.ios stream contains overloaded extraction operator>>


Question:
What is iostream stream class?

1.iostream class inherits the properties of ios.

2.iosstream class inherits the properties of istream and ostream.

3.both (a) and (b)

4.None of These


Question:
What is istream stream class?

1.ios stream class inherits the properties of ios.

2.ios stream contains overloaded extraction operator>>.

3.both (a) and (b)

4.None of These


Question:
What is procedure-oriented Language?

1.A procedure-oriented Language is a language that incorporates all object-oriented programming features

2.A procedure-oriented Language is a language that supports encapsulation and object identity

3.A procedure-oriented Language is a language that consists of writing a list of instructions

4.A procedure-oriented Language is a language that does not support Inheritance and Dynamic binding


Question:
What is the most striking feature of class?

1.Data encapsulation

2.Collection of objects of similar type

3.Inheritance

4.All of the above


Question:
When a program is executed, the ____ interacted by sending a message to one another.




1.Objects

2.Classes

3.Operating system

4.Memory


Question:
When an object is created an initialization needs to be done which is automatically done by the ____ function?

1.Constructor

2.Destructor

3.Friend

4.Member


Question:
Which access specifier makes the class member accessible outside the class but can be accessed by any subclass of that class?

1.Private

2.Public

3.Protected

4.All of the above


Question:
Which approach among the following supports all the features along with inheritance and dynamic binding?

1.Object-based approach

2.Object-oriented approach

3.both (a) and (b)

4.None of These


Question:
Which concept is not supported by object-based programming languages?


1.Inheritance

2.Dynamic binding

3.Only A

4.Both A and B


Question:
Which feature's behavior of OOP depends upon the types of data used in the operation.

1.Inheritance Abstraction

2.Polymorphism

3.Abstraction

4.Encapsulation


Question:
Which features of OOP are extensively used in implementing inheritance?

1.Dynamic binding

2.Abstraction

3.Operator overloading

4.Polymorphism


Question:
Which function incorporates a membership 'identity label' in the header?

1.Member functions

2.Normal functions

3.Inline functions

4.Constant functions


Question:
Which function incorporates a membership 'identity label' in the header?

1.Member functions

2.Normal functions

3.Inline functions

4.Constant functions


Question:
Which functions are declared inside a class have to be defined separately outside the class?




1.Static functions

2.Const functions

3.Inline functions

4.Member functions


Question:
Which is not true about the object-oriented approach?

1.Emphasis is on data rather than procedure

2.Data is hidden and cannot be accessed by external functions

3.Objects communicate through functions

4.It supports abstract data but not the class


Question:
Which language among the following support an object-based approach?

1.Modula-3

2.83 Ada

3.Modula-2

4.both a and b


Question:
Which language among the following support an object-oriented approach?

1. Modula-3

2.Ada 95

3.both (a) and (b)

4.Modula-2


Question:
Which language does not follow the concept of OOP?

1.FORTAN

2.RUBY

3.JADE

4.SCALA


Question:
Which of the following defines a Meta class?

1.A Meta class is a class that may not itself have any instances.

2.A Meta class is a class of a class.

3.Meta classes are classes that are different than plain classes.

4.All of the above


Question:
Which one of the following defines correct differences between structure and class?

1.Structure only holds the data, classes hold the data and functions

2.The structure holds the data and functions, classes only hold the data

3.The structure is the instance of the class, classes are a set of objects

4.Members of structure and class can be both public and private


Question:
Which one of the following is the demerit of procedure-oriented languages?

1.A procedure-oriented language does not model real-world problems

2.A procedure-oriented language does not model real-world problems

3.A procedure-oriented Language works slowly

4.In procedure-oriented Language, it is difficult to apply the inheritance concept


Question:
Which one of the following states the correct difference between object-oriented programming and object-based programming?

1.In procedure-oriented language, large programs are decomposed into functions In an object-oriented language, programs are decomposed into functions.

2.A procedure-oriented language emphasizes doing things or algorithms. An object-oriented language emphasizes data rather than procedure.

3.both (a) and (b)

4.None of these


Question:
Why classes are known as abstract data types (ADT)?

1.Because classes are user-defined data types

2.Because it supports the theory of hierarchical classification

3.Because it allows dynamic binding

4. Because it uses the concept of data abstraction


Question:
__ is the process of compartmentalizing the elements of an abstraction that contribute to its structure and behavior?

1.Encapsulation

2.Abstraction

3.Classes

4.Inheritance


Question:
__ is the property that distinguishes an active object from one that is not active?

1.Typing

2.Concurrency

3.Hierarchy

4.Persistence


Question:
___ is the property of an object through which its existence transcends time?




1.Object

2.Concurrency

3.Hierarchy

4.Persistence


Question:
___ member variables are initialized to zero when the first object of its class is created?




1.Static

2.Local

3.Global

4.Externa


Question:
____ is considered to be a partitioned area of computer memory that stores and set of operations that can access the data.

1.Classes

2.Objects

3.Variables

4.Functions


More MCQS

  1. OOPs MCQs Set 1
  2. OOPs MCQs Set 2
Search
Olete Team
Online Exam TestTop Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on Online Exam Testwebsite is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!