Properties

Question 1
Which of the following operator(s) cannot be overloaded?
A
. (Member Access or Dot operator)
B
?: (Ternary or Conditional Operator )
C
:: (Scope Resolution Operator)
D
All of the above
       OOPS       Properties       ISRO-2017 May
Question 1 Explanation: 
. (Member Access or Dot operator), ?: (Ternary or Conditional Operator ) and :: (Scope Resolution Operator) are ternary operators. It can’t be overloaded.
Question 2
The built-in base class in Java, which is used to handle all exceptions is
A
Raise
B
Exception
C
Error
D
Throwable
       Java       Properties       ISRO CS 2013
Question 2 Explanation: 
Throwable class is the built-in base class used to handle all the exceptions in Java.
Question 3
An operation can be described as:
A
Object behavior
B
Functions
C
Class Behavior
D
(A),(B)
       Programming-in-C++       Properties       Nielit Scientist-B IT 4-12-2016
Question 3 Explanation: 
An operation is class and object behavior
Question 4
Object oriented inheritance models:
A
"is a kind of" relationship
B
"has a" relationship
C
"want to be" relationship
D
"contains" of relationship
       OOPS       Properties       Nielit Scientist-B IT 4-12-2016
Question 4 Explanation: 
Generalization--> "is a kind of" relationship. It is used for object oriented inheritance models.
Aggregation-->"Has a" relationship
Question 5
Control Structures include
A
iteration
B
rendezvous statements
C
exception statements
D
all of these
       OOPS       Properties       Nielit Scientist-B CS 2016 march
Question 5 Explanation: 
● A control structure is a block of programming that analyzes variables and chooses a direction in which to go based on given parameters.
● The term flow control details the direction the program takes (which way program control "flows").
● Hence it is the basic decision-making process in computing; flow control determines how a computer will respond when given certain conditions and parameters.
Question 6
In object oriented design of software, objects have
A
attributes and name only
B
operations and name only
C
attributes name and operations
D
mutation and permutation property
       OOPS       Properties       Nielit Scientist-B CS 2016 march
Question 6 Explanation: 
● Object-oriented design is the process of planning a system of interacting objects for the purpose of solving a software problem.
● An object contains encapsulated data and procedures (operations) grouped together to represent an entity. The 'object interface' defines how the object can be interacted with.
Question 7
Give the output
#include
using namespace std;
class Base
{
Public:
int x,y;
Public:
Base(int i, int j)
{
x=i;y=j;
}
};
class Derived:public Base
{
public:
Derived(int i,int j):x(i),y(j){}
void print()
{
cout< };
int main(void)
{
Derived q(10,10);
q.print();
return 0;
}
A
1010
B
compile error
C
00
D
None of the option
       OOPS       Properties       Nielit Scientist-B IT 22-07-2017
Question 7 Explanation: 
We can’t directly assign the base class members by using​ ​ initializer list​ in the derived class
We should call the base class constructor in order to initialize base class members.
Question 8
If the objects focus on the problem domain, then we are concerned with
A
Object Oriented Analysis
B
Object Oriented Design
C
Object Oriented Analysis and design
D
None of the above
       OOPS       Properties       Nielit Scientific Assistance IT 15-10-2017
Question 8 Explanation: 
→ The purpose of any analysis activity in the software life cycle is to create a model of the system's functional requirements that is independent of implementation constraints.
→ The main difference between object-oriented analysis and other forms of analysis is that by the object-oriented approach we organize requirements around objects, which integrate both behaviors (processes) and states (data) modeled after real world objects that the system interacts with. In other or traditional analysis methodologies, the two aspects: processes and data are considered separately.
→ For example, data may be modeled by ER diagrams, and behaviors by flow charts or structure charts.
Question 9
Is null an object?
A
yes
B
No
C
Sometimes yes
D
None of these
       OOPS       Properties       Nielit Scientific Assistance IT 15-10-2017
Question 9 Explanation: 
If null were an Object, it would support the methods of java.lang.Object such as equals().
However, this is not the case - any method invocation on a null results in a NullPointerException.
There is also a special null type, the type of the expression null, which has no name. Because the null type has no name, it is impossible to declare a variable of the null type or to cast to the null type. The null reference is the only possible value of an expression of null type. The null reference can always be cast to any reference type. In practice, the programmer can ignore the null type and just pretend that null is merely a special literal that can be of any reference type
Question 10
Which of these events will be generated if we close an applet's window?
A
ActionEvent
B
ComponentEvent
C
AdjustmentEvent
D
WindowEvent
       OOPS       Properties       Nielit Scientific Assistance IT 15-10-2017
Question 10 Explanation: 
A low level event that indicates that a window has changed its status. This low-level event is generated by a Window object when it is opened, closed, activated, deactivated, iconified, or deiconified, or when focus is transferred into or out of the Window.
Question 11
Which of the following object types are generally autonomous, meaning that they can exhibit some behavior without being operated upon by another object.
A
Passive
B
Active
C
Both A) and B)
D
None of the mentioned
       OOPS       Properties       Nielit Scientific Assistance IT 15-10-2017
Question 11 Explanation: 
● An active object is one that encompasses its own thread of control.
● Active objects are generally autonomous, meaning that they exhibit some behaviour without being operated upon by another object
● Passive objects can only undergo a state change when explicitly acted upon
Question 12
What is 'basis of Encapsulation'?
A
Object
B
Class
C
Method
D
All of the above
       OOPS       Properties       Nielit Scientific Assistance IT 15-10-2017
Question 12 Explanation: 
Encapsulation is the mechanism that binds together code and data it manipulates, and keeps both safe from outside interface and misuse. Class, which contains data members and methods is used to implement Encapsulation.
Question 13
Runtime polymorphism is achieved by _____
A
Friend function
B
Virtual function
C
Operator overloading
D
Function overloading
       OOPS       Properties       KVS 22-12-2018 Part-B
Question 13 Explanation: 
→ In Run time Polymorphism, call is not resolved by the compiler.
→ Run time Polymorphism is achieved by virtual functions and pointers.
→ Compile time Polymorphism achieved by function overloading and operator overloading.
Question 14
Usually pure virtual function
A
Has complete function body
B
Will never be called
C
Will be called only to delete an object
D
Is defined only in derived class
       OOPS       Properties       KVS 22-12-2018 Part-B
Question 14 Explanation: 
→ A virtual function or virtual method is an inheritable and overridable function or method for which dynamic dispatch is facilitated.
→ A pure virtual function or pure virtual method is a virtual function that is required to be implemented by a derived class if the derived class is not abstract.
Question 15
Use of virtual function implies____
A
Overloading
B
Overriding
C
Static binding
D
Dynamic binding
       OOPS       Properties       KVS 22-12-2018 Part-B
Question 15 Explanation: 
→ A virtual function or virtual method is an inheritable and overridable function or method for which dynamic dispatch is facilitated.
→ Dynamic binding occurs when a pointer or reference is associated with a member function based on the dynamic type of the object.
→ The member function that is dynamically bound must override a virtual function declared in a direct or indirect base class.
Question 16
Additional information sent when an exception is thrown may be placed in___
A
Additional information sent when an exception is thrown may be placed in___
B
The function that caused the error
C
The catch block
D
An object of the exception class
       OOPS       Properties       KVS 22-12-2018 Part-B
Question 16 Explanation: 
→ A catch block is where you handle the exceptions, this block must follow the try block.
→ A single try block can have several catch blocks associated with it. You can catch different exceptions in different catch blocks.
→ When an exception occurs in try block, the corresponding catch block that handles that particular exception executes
Question 17
Which of the following is not true in case of public inheritance in c++?
A
Each public member in the base class is public in the derived class
B
Each protected member in the base class is protected in the derived class
C
Each private member in the base class remains private in the base class
D
Each private member in the base class remains private in the derived class
       OOPS       Properties       KVS 22-12-2018 Part-B
Question 17 Explanation: 
→ Public Inheritance − When deriving a class from a public base class, public members of the base class become public members of the derived class and protected members of the base class become protected members of the derived class.
→ A base class's private members are never accessible directly from a derived class, but can be accessed through calls to the public and protected members of the base class. We can summarize the different access types according to - who can access them in the following way −

Question 18
How many characters does an escape sequence (\On, \Hn,\n,\f) in C++ consume?
A
1
B
3
C
2
D
None of these
       OOPS       Properties       KVS DEC-2013
Question 18 Explanation: 
→ An escape sequence is a sequence of characters that does not represent itself when used inside a character or string literal, but is translated into another character or a sequence of characters that may be difficult or impossible to represent directly.
→ All escape sequences consist of two or more characters, the first of which is the backslash, \ (called the "Escape character"); the remaining characters determine the interpretation of the escape sequence. For example, \n is an escape sequence that denotes a newline character.
→ If we treat it a character constant means one character
Note: An escape sequence is regarded as a single character and is therefore valid as a character constant.
Question 19
Which of the following is not true for overloaded function in C++?
A
Overloaded functions should have different arguments lists
B
Overloaded functions having the same argument lists should have a different return type.
C
Functions cannot be overloaded on the basis of one being static and the other non static
D
None of these
       OOPS       Properties       KVS DEC-2013
Question 19 Explanation: 
Two or more functions having same name but different argument(s) are known as overloaded functions. So option is not true.
Question 20
Which of the following statements is true?
A
The JAVA compile produces a code for JVM, which is executed by a JAVA interpreter
B
The JAVA compile produces code directly for JAVA interpreter
C
The JAVA compiler directly executes codes in JVM
D
The JAVA compile helps in directly executing a code on different operating
       OOPS       Properties       KVS DEC-2013
Question 20 Explanation: 
● JVM is a engine that provides runtime environment to drive the Java Code or applications. It converts Java bytecode into machines language.
● First, Java code is compiled into bytecode. This bytecode gets interpreted on different machines
Question 21
From the following java determine the attributes of the class students:
Class student
{
String name;
Int marks;
};
Public static void main()
{
Student S1=new student();
Student S2=new student();
}
A
Only name
B
Both name and marks
C
Only S1
D
Both S1 and S2
       OOPS       Properties       KVS DEC-2013
Question 21 Explanation: 
→ The attributes of student class are name and marks.
→ There are two objects created in the above program and both have same attributes.
Question 22
In object oriented programming, by wrapping up characteristics and behaviour into one unit, we achieve
A
Data Abstraction
B
Data Encapsulation
C
Data Hiding
D
All of these
       OOPS       Properties       KVS DEC-2013
Question 22 Explanation: 
●Data hiding is a software development technique specifically used in object-oriented programming (OOP) to hide internal object details (data members). Data hiding ensures exclusive data access to class members and protects object integrity by preventing unintended or intended changes.
● Data abstraction refers to providing only essential information to the outside world and hiding their background details, i.e., to represent the needed information in program without presenting the details.
● Encapsulation is a process of combining data members and functions in a single unit called class. This is to prevent the access to the data directly, the access to them is provided through the functions of the class.
Question 23
The major goal of object oriented programming is
A
top down program development
B
Speed
C
User interface
D
Reuse
       OOPS       Properties       KVS DEC-2017
Question 23 Explanation: 
Languages that support object oriented programming typically use inheritance for code reuse and extensibility in the form of either classes or prototypes. Those that use classes support two main concepts:
1. Classes – the definitions for the data format and available procedures for a given type or class of object; may also contain data and procedures (known as class methods) themselves, i.e. classes contain the data members and member functions
2. Objects – instances of classes
Question 24
Which of the following most accurately describes "multiple inheritance"?
A
When a child class has both an "is a" and "has a" relationship with its parent class
B
When two classes inherit from each other
C
When a base class has two or more derived classes
D
When a child class has two or more parent class
       OOPS       Properties       KVS DEC-2017
Question 24 Explanation: 
→ Multiple inheritance is a feature of some object-oriented computer programming languages in which an object or class can inherit characteristics and features from more than one parent object or parent class. It is distinct from single inheritance, where an object or class may only inherit from one particular object or class.
Question 25
Which of the following is NOT true in case of protected Inheritance in C++?
A
Each public member in the base class is protected in the derived class
B
Each protected member in the base class is protected in the derived class
C
Each private member in the base class is private in the derived class
D
Each private member in the base class is visible in the derived class
       OOPS       Properties       KVS 30-12-2018 Part B
Question 25 Explanation: 
The following table shows the access to members permitted by each modifier.
Question 26
Mechanism of deriving a class from another derived class is known as
A
Polymorphism
B
Single inheritance
C
Multilevel inheritance
D
Message passing
       OOPS       Properties       KVS 30-12-2018 Part B
Question 26 Explanation: 
When a class is derived from a class which is also derived from another class, i.e. a class having more than one parent classes, such inheritance is called Multilevel Inheritance.
Question 27
Which one of the following is correct for overloaded functions in C++ ?
A
Compiler sets up a separate function for every definition of function.
B
Compiler does not set up a separate function for every definition of function.
C
Overloaded functions cannot handle different types of objects.
D
Overloaded functions cannot have same number of arguments.
       Programming-in-c++       Properties       UGC NET CS 2017 Jan -paper-2
Question 27 Explanation: 
→ Function overloading allows you to use the same name for different functions, to perform, either same or different functions in the same class.
→ Compiler sets up a separate function for every definition of function.
→ Two ways to use overloaded function is
1. By changing number of Arguments.
2. By having different types of argument.
Question 28
Which of the following operators cannot be overloaded in C/C++ ?
A
Bitwise right shift assignment
B
Address of
C
Indirection
D
Structure reference
       Programming-in-c++       Properties       UGC NET CS 2017 Jan -paper-2
Question 28 Explanation: 
→ We can’t overload structure reference in C and C++.
→ Bitwise right shift assignment(>>), Address of(&) and Indirection(*) can be overloaded in C and C++.
→ The . (dot) operator and the → (arrow) operator are used to reference individual members of classes, structures, and unions.
Question 29
Which of the following, in C++, is inherited in a derived class from base class ?
A
constructor
B
destructor
C
data members
D
virtual methods
       Programming-in-c++       Properties       UGC NET CS 2015 Jun- paper-2
Question 29 Explanation: 
Data members in C++, is inherited in a derived class from base class.
→ When creating a class, instead of writing completely new data members and member functions, the programmer can designate that the new class should inherit the members of an existing class. This existing class is called the base class, and the new class is referred to as the derived class.
→ A derived class can access all the non-private members of its base class. Thus base-class members that should not be accessible to the member functions of derived classes should be declared private in the base class.
Question 30
Which of the following is incorrect in C++ ?
A
When we write overloaded function we must code the function for each usage.
B
When we write function template we code the function only once.
C
It is difficult to debug macros
D
Templates are more efficient than macros
E
None of These
       Programming-in-c++       Properties       UGC NET CS 2015 Jun- paper-2
Question 30 Explanation: 
TRUE: When we write overloaded function we must code thevfunction for each usage.
TRUE: When we write function template we code the function only once.
TRUE: It is difficult to debug macros
TRUE: Templates are more efficient than macros
1. Macros are a primitive form, without much compiler enforcement
2. Templates are more advanced, and have a lot better compiler type-checking, error messages, etc.
3. Templates can only generate dynamic class types
4. Macros can generate almost any code you want (other than another macro definition).
5. Macros can be very useful to embed static tables of structured data into your code.
Note: Excluded for evaluation. Given all options are correct.
Question 31
When the inheritance is private, the private methods in base class are __________ in the derived class (in C++).
A
inaccessible
B
accessible
C
protected
D
public
       Programming-in-c++       Properties       UGC NET CS 2015 Jun- paper-2
Question 31 Explanation: 
When the inheritance is private, the private methods in base class are inaccessible in the derived class.
Question 32
Polymorphism means :
A
A template function
B
Runtime type identification within a class hierarchy
C
Another name for operator overloading
D
Virtual inheritance
       Programming-in-c++       Properties       UGC NET CS 2004 Dec-Paper-2
Question 32 Explanation: 
→ Polymorphism means "many forms", and it occurs when we have many classes that are related to each other by inheritance.
→ Polymorphism means runtime type identification within a class hierarchy.
Question 33
Function overloading done at :
A
Runtime
B
Compile time
C
Linking time
D
Switching from function to function
       Programming-in-c++       Properties       UGC NET CS 2005 Dec-Paper-2
Question 33 Explanation: 
Function overloading done at compile time. In the Java programming language, function overloading is also known as compile-time polymorphism and static polymorphism.
Question 34
The data hiding is taken care by :
A
Abstraction
B
Encapsulation
C
Modularity
D
Inheritance
       Programming-in-c++       Properties       UGC NET CS 2005 june-paper-2
Question 34 Explanation: 
→ Abstraction is used for hiding the unwanted/important data and giving relevant data. → It only focus on what the object does instead of how it does it.
Question 35
If a data-item is declared as a protected access specifier then it can be accessed :
A
Anywhere in the program
B
By the base and derived classes
C
Only by base class
D
Only by derived class
       Programming-in-c++       Properties       UGC NET CS 2005 june-paper-2
Question 35 Explanation: 
If a data item is declared as a protected access specifier then it can be accessed by the base and derived classes.
Question 36
In a object oriented software design, ‘Inheritance’ is a kind of __________ .
A
relationship
B
module
C
testing
D
optimization
       Programming-in-c++       Properties       UGC NET CS 2006 Dec-paper-2
Question 36 Explanation: 
→ Inheritance refers to a particular relationship that two or more classes can share.
→ Polymorphism refers to a particular feature of classes that define an inheritance relationship.
Question 37
A subclass having more than one super class is called __________ .
A
Category
B
Classification
C
Combination
D
Partial participation
       Programming-in-c++       Properties       UGC NET CS 2006 June-Paper-2
Question 37 Explanation: 
A subclass having more than one super class is called category.
Question 38
Which of the following are two special functions that are meant for handling exception, that occur during exception handling itself ?
A
Void terminate ( ) and Void unexpected ( )
B
Non void terminate ( ) and void unexpected ( )
C
Void terminate ( ) and non void unexpected ( )
D
Non void terminate ( ) and non void unexpected ( )
       Programming-in-c++       Properties       UGC NET CS 2012 Dec-Paper-2
Question 39
Which of the following operators can not be overloaded in C++ ?
A
B
+ =
C
= =
D
: :
       Programming-in-c++       Properties       UGC NET CS 2013 Dec-paper-2
Question 39 Explanation: 
→ Scope resolution operator(::) is used to define a function outside a class or when we want to use a global variable but also has a local variable with the same name.
→ Scope resolution operator(::) can not be overloaded.
Question 40
_________ allows to create classes which are derived from other classes, so that they automatically include some of its “parent’s” members, plus its own members.
A
Overloading
B
Inheritance
C
Polymorphism
D
Encapsulation
       Programming-in-c++       Properties       UGC NET CS 2013 Dec-paper-2
Question 40 Explanation: 
→ Inheritance allows to create classes which are derived from other classes, so that they automatically include some of its “parent’s” members, plus its own members.
→ The main advantage of inheritance is “reusability”.
Question 41
Which of the following metric does not depend on the programming language used ?
A
Line of code
B
Function count
C
Member of token
D
All of the above
       Programming       Properties       UGC NET CS 2012 June-Paper2
Question 41 Explanation: 
Function count does not depend on the programming language used. It only counts number of functional entries in the function.
Lines of code (LOC) is a software metric used to measure the size of a computer program by counting the number of lines in the text of the program's source code.
Question 42
What features make C++ so powerful ?
A
Easy implementation
B
Reusing old code
C
Easy memory management
D
All of the above
       Programming-in-c++       Properties       UGC NET CS 2011 June-Paper-2
Question 42 Explanation: 
C++ Features:
1. Simple (or) Easy implementation
2. Portability
3. Reusing old code
4. Platform dependent
5. Object oriented oriented
6. Case sensitive
7. Compiler based
8. Syntax based language
9. Easy memory management
Question 43
The goal of operator overloading is
A
to help the user of a class
B
to help the developer of a class
C
to help define friend function
D
None of the above
       Programming-in-c++       Properties       UGC NET CS 2011 June-Paper-2
Question 44
The friend functions are used in situations where :
A
We want to have access to unrelated classes
B
Dynamic binding is required
C
Exchange of data between classes to take place
D
None of the above
       Programming-in-c++       Properties       UGC NET CS 2009-June-Paper-2
Question 44 Explanation: 
A friend function of a class is defined outside that class scope but it has the right to access all private and protected members of the class. Even though the prototypes for friend functions appear in the class definition, friends are not member functions.
1. A function can only be declared a friend by a class itself.
2. It can have access to all members of the class, even private ones.
Question 45
Encapsulation is
A
Dynamic binding
B
A mechanism to associate the code and data
C
Data abstraction
D
Creating new class
       Programming-in-c++       Properties       UGC NET CS 2009 Dec-Paper-2
Question 45 Explanation: 
→ Encapsulation is a mechanism to associate the code and data.
→ Encapsulation is wrapping up of data into single unit.
Question 46
Which of the statements are true?
I. Function overloading is done at compile time.
II. Protected members are accessible to the member of derived class.
III. A derived class inherits constructors and destructors.
IV. A friend function can be called like a normal function.
V. Nested class is a derived class.
A
I, II, III
B
II, III, V
C
III, IV, V
D
I, II, IV
       Programming-in-c++       Properties       UGC NET CS 2009 Dec-Paper-2
Question 46 Explanation: 
FALSE: Function overloading is done at run time.
TRUE: Protected members are accessible to the member of derived class.
TRUE: A derived class inherits constructors and destructors.
FALSE: A friend function of a class is defined outside that class scope but it has the right to access all private and protected members of the class. Even though the prototypes for friend functions appear in the class definition, friends are not member functions.
1. A function can only be declared a friend by a class itself.
2. It can have access to all members of the class, even private ones.
TRUE: Nested class is a derived class.
Question 47
A copy constructor is invoked when :
A
a function returns by value
B
an argument is passed by value
C
a function returns by reference
D
none of the above
       Programming-in-c++       Properties       UGC NET CS 2008 Dec-Paper-2
Question 47 Explanation: 
A copy constructor is a special constructor for creating a new object as a copy of an existing object.
Features:
1. Initialize one object from another of the same type.
2. Copy an object to pass it as an argument to a function.
3. Copy an object to return it from a function.
Question 48
Function overloading is a concept in which :
A
a function is used to implement lots of tasks at the same time.
B
a function is called too many number of times by another function.
C
a function provides common interface to the user to carry out possibly different functions in each call.
D
a function is computationally too expensive for the system to handle.
       Programming-in-c++       Properties       UGC NET CS 2008-june-Paper-2
Question 48 Explanation: 
Function overloading is a concept in which a function provides common interface to the user to carry out possibly different functions in each call.
Question 49
Which of the following is not true in C++ ?
A
“Private” elements of a base class are not accessible by members of its derived class.
B
“Protected” elements of base class are not accessible by members of its derived class.
C
When base class access specified is “Public”, public elements of the base class become public members of its derived class.
D
When base class access specified is “Public”, protected elements of a base class become protected members of its derived class.
       Programming-in-c++       Properties       UGC NET CS 2007-Dec-Paper-2
Question 49 Explanation: 
TRUE: “Private” elements of a base class are not accessible by members of its derived class.
FALSE: “Protected” elements of base class are not accessible by members of its derived class.
TRUE: When base class access specified is “Public”, public elements of the base class become public members of its derived class.
TRUE: When base class access specified is “Public”, protected elements of a base class become protected members of its derived class.
Question 50
What keyboard in class specification helps to hide data :
A
Public
B
Private
C
Static
D
Void
       Programming-in-c++       Properties       UGC NET CS 2007 June-Paper-2
Question 50 Explanation: 
→ Private access specifier will helps to hide data.
→ The private access modifier is accessible only within class.
Question 51
Runtime polymorphism can be achieved by :
A
Accessing virtual function through the pointer of the base class
B
Accessing virtual function through the object
C
The derived class
D
None of these
       Programming-in-c++       Properties       UGC NET CS 2007 June-Paper-2
Question 51 Explanation: 
Runtime polymorphism can be achieved by accessing virtual function through the pointer of the base class.
Question 52
A subclass having more than one super class is called :
A
Category
B
Classification
C
Combination
D
Partial Participation
       Programming-in-c++       Properties       UGC NET CS 2007 June-Paper-2
Question 52 Explanation: 
A subclass having more than one super class is called category.
Question 53
Abstraction and encapsulation are fundamental principles that underlie the object oriented approach to software development. What can you say about the following two statements ? I. Abstraction allows us to focus on what something does without considering the complexities of how it works. II. Encapsulation allows us to consider complex ideas while ignoring irrelevant detail that would confuse us.
A
Neither I nor II is correct.
B
Both I and II are correct.
C
Only II is correct.
D
Only I is correct.
       Programming-in-c++       Properties       UGC NET CS 2017 Jan- paper-3
Question 53 Explanation: 
Statement-I: FALSE
→ Abstraction is a process of hiding the implementation details and showing only functionality to the user.
→ The data type created by the data abstraction process is called abstract data type(ADT).
→ ADT is a class of objects whose logical behavior is defined by a set of values and a set of operations.
Statement-II: FALSE
→ Encapsulation is a mechanism to associate the code and data.
→ Encapsulation is wrapping up of data into single unit.
Question 54
Method overriding can be prevented by using final as a modifier at ______.
A
The start of the class.
B
The start of method declaration.
C
The start of derived class.
D
The start of the method declaration in the derived class.
       OOPS       Properties       UGC NET CS 2016 Aug- paper-3
Question 54 Explanation: 
Method overriding can be prevented by using final as a modifier at the start of method declaration.
Question 55
Which of the following statements is correct?
(1) Every class containing abstract method must not be declared abstract.
(2) Abstract class cannot be directly initiated with ‘new’ operator.
(3) Abstract class cannot be initiated.
(4) Abstract class contains definition of implementation.
A
(1)
B
(2)
C
(2) and (3)
D
All are correct.
       OOPS       Properties       UGC NET CS 2016 July- paper-3
Question 55 Explanation: 
• Abstract class may consist of at least one abstract method.

• Abstract method means method without body, we can also be called as pure virtual functions.

• If a class is marked with keyword abstract then it is called an abstract class. It can NOT be instantiated by using new operator. But an abstract class can be used as the superclass reference for the subclass object.

• Abstract classes, by design, are not complete or functional. They are meant to serve as a base from which complete classes can be built, by aggregating the common members and methods that they all will need into an abstract base class, and then allowing the inheriting classes to fill out the necessary details. So abstract class can’t be instantiated

Question 56
Which of the following is used to make an Abstract class?
A
Making at least one member function as pure virtual functions
B
Making at least one member function as virtual function
C
Declaring as Abstract class using virtual keyword
D
Declaring as Abstract class using static keyword
       OOPS       Properties       UGC NET CS 2015 Dec - paper-3
Question 56 Explanation: 
Abstract class may consist of at least one abstract method.
Abstract method means method without body, we can also be called as pure virtual functions.
Question 57
Match the following with reference to object oriented modelling:

A
(a)-(iv), (b)-(iii), (c)-(i), (d)-(ii)
B
(a)-(iii), (b)-(iv), (c)-(i), (d)-(ii)
C
(a)-(iii), (b)-(i), (c)-(ii), (d)-(iv)
D
(a)-(iv), (b)-(iii), (c)-(ii), (d)-(i)
       OOPS       Properties       UGC NET CS 2015 Dec - paper-3
Question 57 Explanation: 
Polymorphism: Polymorphism means many forms. It is used to perform similar operations to do similar things.
Inheritance: It is the process of creating new classes(derived class) from existing classes( base class) by inheriting their properties into derived class.
Encapsulation:It is the process of Picking both operator and attributes with operations appropriate to model an object
Abstraction: Abstraction refers to the process of Hiding implementation details of methods from users of objects
Question 58
Which of the following is/are correct with reference to Abstract class and interface ?
(a)A class can inherit only one Abstract class but may inherit several interfaces.
(b)An Abstract class can provide complete and default code but an interface has no code.
A
(a) is true
B
(b) is true
C
Both (a) and (b) are true
D
Neither (a) nor (b) is true
       OOPS       Properties       UGC NET CS 2015 Dec - paper-3
Question 58 Explanation: 
Statement (a) is true.
An abstract class may or may not have abstract methods so that it may provide the complete and default code.
There are 58 questions to complete.
PHP Code Snippets Powered By : XYZScripts.com