Blogger Text

My Aim to Provide you quality contents, Tips & Tricks, Software, Microsoft Office, Graphic Editing (Adobe PhotoShop, After Affects, Illustrator, inDesign) Corel Draw, Corel Video Studio, Cyberlink PowerDirector, Power ActionCinema, Tutorials about Blogging and VU Assignments, Quizes & GDB Solutions and Much More... at regular Basis
                                     ***    Kindly Subscribe our Official YouTube Channel "INFOPALACESS OFFICIAL-Tuts: in this channel we upload Programming (C,C++,C# JAVA, PHP), Web Development, Graphics Editing and Microsoft Office Step by Step Tutorials from bigginer to Advance Level. We also provide free online courses at our YouTube Channel. ***   Graded Assignments/Quizes and GDB will start in Next Week. Solution ideas of All assignments, Quizes and GDB will be available here. If you have any problem regarding this then you can contact us.

CS301 150+ Solved MCQs with References CS301 Quiz 1 Spring 2019

Data Structures CS301 Quiz Spring 2019


Here i am going to Share 100+ Solved MCQs with Refereneces and Also going to share video for it..... 


                     Click Here to Download CS301 MCQs File in PDF


CS 301 150+ MCQs Solved with Referencess 



A template provides a convenient way to make a family of.
variables and data members 
functions and classes 
classes and exceptions 
programs and algorithms
A class template may inherit from another class template.
True 

False
Target of a _____ function call is determined at run time.
instance
virtual 
operator
none of given
A class hierarchy .
shows the same relationships as an organization chart.
describes “has a” relationships. 
describes “is a kind of” relationships. 
shows the same relationships as a family tree.
Sender of the message does not need to know the exact class of receiver in______.
Abstraction 
Polymorphism 
Inheritance 
none of the given
A function call is resolved at run-time in_________ .
non-virtual member function 
virtual member function 
Both non-virtual member and virtual member function. 
None of given
Adding a derived class to a base class requires fundamental changes to the base class.
True
False
User can make virtual table explicitly.
True 

False
Binding means that target function for a call is selected at compile time.
Static 
Dynamic 
Automatic 
None of given
Target of a _____ function call is determined at run time.
instance 
virtual 
operator 
none of given
Which line will produce error. Class phone: private Transmit, private Receiver { } 1. int main() 2. { 3. phone obj; 4. Tranmit* obj1 = &obj; 5. Received obj2 = &obj; 6. }.
3rd line will produce error 
4th line will produce error 
3rd and 4th line will produce error. 
5th line will produce error
Function overriding is done in context of, 
Single class 
Single derived class 
Single base class 
Derived and base classes
Consider the code below, class class1{ public: void func1(); }; class class2 : protected class1 { }; Function func1 of class1 is ____ in class2, 
public 
protected 
private 
none of the given options
The following statements: 1) int iArray[5]; 2) int *pArr = iArray;
These statements will compile successfully 
Error in first statement 
Error in second statement 
None of given options
Methodologies to the development of reusable software relate to________. 
Structure programming 
procedural programming 
generic programming 
None of the given
Function template must have a parameter. 
True 
False
The default inheritance mode is, 
Public inheritance 
Protected inheritance 
Private inheritance 
None of these options
Two functions with same names, parameters and return type can exist in, 
Function overloading 
Function overriding 
Operator overloading 
None of these options
Consider the code below, class c1{ }; class c2 : public c1 { }; class c3 : public c2 { }; Then c2 is, 
Direct base class of c3 
Direct child class of c3 
Direct base class of c1 
None of these
Virtual functions allow you to 
create an array of type pointer-to-base class that can hold pointers to derived classes. 
create functions that can never be accessed. 
group objects of different classes so they can all be accessed by the same function code. 
use the same function call to execute member functions of objects from different classes.
User can make virtual table explicitly. 
True 
False
In order to define a class template the first line of definition must be: 
template <typename T>
 
typename <template T> 
Template Class <ClassName> 
Class <Template T>
Consider the following statements: 1) int iArray[5]; 2) int *pArr = iArray; 
These statements will compile successfully 
Error in first statement 
Error in second statement 
None of given options
In c++ dynamic binding and polymorphism will be achieved when member function will be __.
private 
public 
virtual 
inline
In type in depended function template should be use where code and behavior must be identical. 
True 
False
Consider the code below, class class1{ protected: int i; }; class class2 : private class1 { }; Then int member i of class1 is ____ in class2, 
public 
protected 
private 
none of the given options
In specialization we can, 
Replace child class with its base class 
Replace base class with its child class (Not Sure) 
Replace both child and base classes interchangeably 
None of the given options
Consider the code below, class class1{ public: void func1(); }; class class2 : public class1 { }; Function func1 of class1 is ____ in class2, 
public 
protected
private 
none of the given options
It is illegal to make objects of one class members of another class.
True 
False
An abstract class is useful when 
no classes should be derived from it. 
there are multiple paths from one derived class to another. 
no objects should be instantiated from its. 
you want to defer the declaration of the class.
In resolution order compiler search firstly _______.
Generic Template 
Partial Specialization 
Complete Specialization 
Ordinary function
template<> class Vector{ void** p; //.... void*& operator[] ((int i); }; 
This specialization can then be used as the common implementation for all Vectors of pointers.
This specialization can then be used as the all type implementation for one type classes. 
This specialization can then be used double type pointers. 
This specialization should be used for Vectors of all type int types.
In private inheritance derived class pointer can be assigned to base class pointer in.
Main function
 
In derived class member and friend functions 
In base class member and friend functions 
None of the given options
Which statement will be true for concrete class? 
it implements an virtual concept. 
it can be instantiated 
it cannot be instantiated 
none of given
Target of a _____ function call is determined at run time.
instance 
virtual 
operator 
none of given
The Specialization pattern after the name says that this specialization is to be used for every___.
data types 
meta types 
virtual types 
pointers type
c++ dynamic binding and polymorphism will be achieved when member function will be __.
private 
public 
virtual 
inline
Consider the code below, class class1{ protected: void func1(); }; class class2 : public class1 { }; Function func1 of class1 is ____ in class2, 
public 
protected
private 
none of the given options
Consider the code below, class class1{ protected: int i; }; class class2 : protected class1 { }; Then int member i of class1 is ____ in class2, 
public 
protected 
private 
none of the given options
Consider the code below, class class1{ private: void func1(); }; class class2 : private class1 { }; Function func1 of class1 is ____ in class2, 
public 
protected 
private 
none of the given options
Target of a _____ function call is determined at run time.
instance 
virtual 
operator 
none of given
Consider the following statements: 1) int iArray[5]; 2) int *pArr = iArray; 
These statements will compile successfully 
Error in first statement 
Error in second statement 
None of given options
Consider the code below, class class1{ private: int i; }; class class2 : private class1 { }; Then int member i of class1 is ____ in class2, 
public 
protected 
private
none of the given options
If there is a pointer, p, to objects of a base class, and it contains the address of an object of a derived class, and both classes contain a virtual member function, ding(), then the statement p->ding(); will cause the version of ding() in the ___ class to be executed.
base 
derived 
virtual 
implemented
A class template may inherit from another class template. 
True 
False
Derived class can inherit from public base class as well as private and protected base classes 
True 
False
Two functions with same names, parameters and return type can exist in, 
Function overloading 
Function overriding 
Operator overloading 
None of these options
Consider the code below, class class1{ private: int i; }; class class2 : public class1 { }; Then int member i of class1 is ____ in class2, 
public 
protected 
private 
none of the given options
Target of a _____ function call is determined at run time.
instance 
virtual 
operator 
none of given
A class template may inherit from another class template.
True 
False
A function call is resolved at run-time in_________ 
non-virtual member function 
virtual member function 
Both non-virtual member and virtual member function.
None of given
A class hierarchy 
shows the same relationships as an organization chart. 
describes “has a” relationships. 
describes “is a kind of” relationships. 
shows the same relationships as a family tree.
Consider the code below, class class1{ public: int i; }; class class2 : public class1 { }; Then int member i of class1 is ____ in class2, 
public 
protected 
private 
none of the given options
Consider the code below, class c1{ }; class c2 : public c1 { }; class c3 : public c2 { }; Then c1 is, 
Direct base class of c3 
Direct child class of c3 
Direct base class of c2 
Direct child class of c2
A class can inherit from more then one class is called.
Simple inheritance 
Multiple inheritances 
Single inheritance 
Double inheritance
template<> class Vector{ void** p; //.... void*& operator[] ((int i); }; 
This specialization can then be used as the common implimentation for all Vectors of pointers.
This spcialization can then be used as the all type implimentation for one type classes. 
This specialization can then be used double type pointers. 
This specialization should be used for Vectors of all type int types.
Consider the code below, class class1{ public: int i; }; class class2 : protected class1 { }; Then int member i of class1 is ____ in class2,
public
protected
private
none of the given options
Consider the code below, class class1{ private: void func1(); }; class class2 : public class1 { }; Function func1 of class1 is ____ in class2,
public
protected
private
none of the given options
Templates automatically create different versions of a function, depending on user input.
True

False
________ Binding means that target function for a call is selected at run time
Automatic
Dynamic
Static
Dramatic
When we create objects, then space is allocated to:
Member function
Access specifier
Data member
None of given
There is only one form of copy constructor.
True
False 
Which of the following features of OOP is used to deal with only relevant details?
Abstraction
Information hiding
Object
___________ Binding means that targets function for a call is selected at compile time.
Static
Dynamic
Automatic
None of given 
A Class hierarchy
Shows the same relationships as an organization chart
Describes “has a” relationships.
Describes “is a kind of” relationships.
Shows the same relationships as a family tree 
In C++, we declare a function virtual by preceding the function header with keyword “Inline”.
True
False 
It is illegal to make objects of one class members of another class.
True
False 
In Resolution order compiler search firstly____________.
Generic Template
Partial Specification
Complete Specification
Ordinary function

Derived class can inherit from public base class as well as private and protected base classes
True
False 
Which line will produce error. Class phone: Private Transmit, private Receiver { } 1.int main () 2. { 3.phone obj; 4.Tranmit*obj1 = &obj; 5.Received obj2 = &obj; 6.}
3rd line will produce error
4th line will produce error
3rd and 4th line will produce error.
5th line will produce error. 
Methodologies to the development of reusable software relate to ____________.
Structure programming
Procedural programming
Generic programming
None of the given 
A template argument is preceded by the keyword__________.
Vector
Class
Template
Type* 
Friends are used exactly the same for template and non-template classes.
True
False 
A function template must have a parameter
True
False

Child class can call constructor of its,
Direct base class
Indirect base class
Both direct and indirect base classes
None of these.
 
Which statement will be true for concrete class?
It implements an virtual concept.
It can be instantiated
It cannot be instantiated
None of given
 
A class D can be derived from a class C, which is derived froma class B, which is derived from a class A
True
False

Adding a derived class to a base class requires fundamental changes to the base class.
True
False

A Class or class template can have member ___________ that are themselves templates.
Variable
Function
Objects
None of given

Which will be the Primary task or tasks of generic programming?
Categorize the abstractions in a domain into concepts
Implement generic algorithms based on the concepts
Build concrete models of the concepts
All of given

The default inheritance mode is,
Public inheritance
Protected Inheritance
Private Inheritance
None of these options

If there is a pointer, p, to objects of a base class, and it contains the address of an object of a derived class, and both classes contain a virtual member function, ding(), then the statement p->ding(); will cause the version of ding() in the __________class to be executed.
Base
Derived
Virtual
Implemented

Sender of the message does not need to know the exact class of receiver in________.
Abstraction
Polymorphism
Inheritance
none of the given


Question # 1 of 10
Information hiding can be achieved through__________.
1.    Encapsulation, Inheritance
2.    Encapsulation, Polymorphism
3.    Encapsulation, Abstraction
4.    Overloading
Question # 2 of 10 ( Start time: 01:11:21 AM ) Total M - 1
A good model is ................ related to a real life problem.
Select correct option:
1.    Loosely
2.    Openly
3.    Closely
Question # 3 of 10 ( Start time: 01:12:33 AM ) Total M - 1
Which of the following features of OOP is used to derive a class from another?
Select correct option:
1.    Encapsulation
2.    Polymorphism
3.    Data hiding
4.    Inheritance


Question # 4 of 10 ( Start time: 01:13:51 AM ) Total M - 1
Which of the following is a weak relationship between two objects?
Select correct option:
1.    Inheritance
2.    Composition
3.    Aggregation
4.    None of given
Question # 5 of 10 ( Start time: 01:14:56 AM ) Total M - 1
Data items in a class must be private.
Select correct option:
1.    True
2.    False








Question # 6 of 10 ( Start time: 01:15:52 AM ) Total M - 1
Which one is a class association
Select correct option:
1.    Simple Association
2.    Inheritance
3.    Composition
4.    Aggregation
Question # 7 of 10 ( Start time: 01:16:55 AM ) Total M - 1
Suppose there is an object of type Person, which of the following can be considered as one of its attributes
Select correct option:
1.    Name
2.    Age
3.    Work()
4.    Both Name and Age



Question # 8 of 10 ( Start time: 01:17:52 AM ) Total M - 1
Which one is not an object association?
Select correct option:
1.    Simple association
2.    Inheritance
3.    Aggregation
4.    Association
Question # 9 of 10 ( Start time: 01:18:50 AM ) Total M - 1
Using encapsulation we can achieve
Select correct option:
1.    Information hiding
2.    Least interdependencies among modules
3.    Implementation independence
4.    All of given options
Question # 10 of 10 ( Start time: 01:19:43 AM ) Total M - 1
In constant member function the type of this pointer is:
Select correct option:
1.    Constant pointer
2.    Constant pointer to object
3.    Constant pointer to class
4.    Constant pointer to constant object
Question # 1 of 10
Which of the following is the way to extract common behavior and attributes from the given classes and make a separate class of those common behaviors and attributes?
1.    Generalization
2.    Sub-typing
3.    Specialization
4.    Extension
Question # 2 of 10
The ability to derive a class from more than one class is called
1.    Single inheritance
2.    Encapsulation
3.    Multiple inheritance
4.    Polymorphism
Question # 3 of 10:
If MyClass has a destructor what is the destructor named?
1.    MyClass
2.    ~MyClass
3.    My~Class
4.    MyClass~
Question # 4 of 10:
Class abc{ ----- }; Is a valid class declaration?
1.    yes
2.    no
Question # 5of 10:
Without using Deep copy constructor, A ____________ problem can occur
1.    System crash
2.    Memory Leakage
3.    Dangling pointer
4.    All of the given
Question # 6 of 10:
If only one behaviour of a derived class is incompatible with base class, then it is:
1.    Generalization
2.    Specialization
3.    Extension
4.    Inheritance
Question # 8 of 10:
Only tangible things can be chosen as an object.
·       True
·       False
·       When we create objects, then space is allocated to:
·       Member functions
·       Access specifier
·       Data members
·       None of the given
·        
·       If we extend our model, and the rest of model is not affected, then its called ___________
·       Consistency
·       Flexibility
·       Efficiency
·       Reusability
·        
·       Using encapsulation we can achieve
·       Information hiding
·       Least interdependencies among modules
·       Implementation independence
·       All of given options
·        
·       Consider the statement “room has chair” which of the following type of association exists between room and chair?
·       Inheritance
·       Composition
·       There is no association
·       Aggregation
·        
·       A good model is ................ related to a real life problem.
·       Loosely
·       Openly
·       Closely
·       Not
·        
·       If a class A inherits from class B, then class A is called.
·       Child Class
·       Derived class
·       Parent class
·       Child and derived class
·        
·       Which one of the following is not a major element in an object model?
·       Abstraction
·       Encapsulation
·       Persistence
·       Hierarchy
·        
·       Member functions defined inside a class declaration are ________ by default.
·       Visible
·       Public
·       Private
·       Changed
·        
·       Advantage(s) of information hiding
·       Simplifies the model
·       Restriction to change
·       Both of above
·       None of the above
·        
·       Which of the following parts of an object exhibits its state?
·       Data
·       Operations
·       Any public part
·       Any private part
·        
·       Without using Deep copy constructor. A___________ problem can occur
·       System crash
·       Memory
·       Leakage
·       Dangling printer
·       All the given
·        
·       Three main characteristics of "Object Oriented programming" are, 
·       Encapsulation, dynamic binding, polymorphism
·       Polymorphism, overloading, overriding
·       Encapsulation, inheritance, dynamic , binding
·       Encapsulation, inheritance, polymorphism
·        
·       Overriding concept is used in”
·       Encapsulation
·       Polymorphism
·       Information hiding
·       None of the given
·        
·       Main advantage of inheritance is:
·       Better understanding
·       Les understating
·       Reuse
·       Less complexity
·        
·       Which one is a class association
·       Simple association
·       Inheritance
·       Composition
·       Aggregation
·        
·       Public member function exposed by a class is called surface
·       True
·       False
·        
·       Constructor and destructor can be declared constant
·       True
·       False
·        
·       Which can allocate dynamic memory allocation through______ keyword.
·       Static
·       Global
·       New
·       Const
·        
·       In inheritance, a child class is sub-type of base class.
·       True
·       False
·        
·       If only one behaviour of a derived class is incompatible with base class, then it is:
·       Generalization
·       Specification
·       Extension
·       Inheritance
·        
·       “A fan has wings”. Which type of relation exists between fan and wings in the sentence?
·       Aggregation
·       Association
·       Generalization
·       Composition
·        
·        
·        
·       When an object initialize _________ automatically call by the complier
·       Constructor
·       Function
·       Object
·       None of the given
·        
·       A class __________ destructor.
·       No
·       One
·       Two
·       Three
·        
·       Suppose there is an object of type person, which of the following can be considered as one of its attributes
·       Name
·       Age
·       Work ()
·       Both name and Age
·        
·       If MyClass has destructor named?
·       MyClass
·       ~MyClass
·       My~Class
·       MyClass~
·        
·       An abstract class shows _______ behaviour.
·       Overriding
·       Specific
·       General
·       None of the given
·        
·       The _________ keyword tells the compiler to substitute the code within the function definition for every instance of a function call.
·       Virtual
·       Inline
·       Instance
·       None of the given
·        
·        
·        
·        
·        
·        
·        
·        
·        
·       We can choose any arbitrary name for a constructor.
Select correct option:
True
·       False
·        
·       Which one is not the main feature of object oriented programming?
Select correct option:
Classes and Objects
Exception handling
Inheritance
Polymorphism 
·       The dot operator (or class member access operator) connects the following two entities (reading from left to right):
Select correct option:
A class member and a class object
A class object and a class
A class and a member of that class
A class object and a member of that class 
·       If only one behaviour of a derived class is incompatible with base class, then it is:
Select correct option:
Generalization
Specialization
Extension 
Inheritance

·       Storing data and functions in a single unit (class). Data cannot be accessible to the outside world and only those functions which are stored in the class can access it
Select correct option:
Inheritance
Abstraction
Polymorphism
Encapsulation 

·       If MyClass has a destructor what is the destructor named?
Select correct option:
MyClass
~MyClass
My~Class
MyClass~
·       A real world object can be transformed into programming entity by defining its respective
Select correct option:
Class
Function
Only states
Only behaviour

Which of the following features of OOP is used to deal with only relevant details?
Select correct option:
Abstraction
Information hiding
Object
Inheritance

In class, attributes and behaviour is represented by:
Select correct option:
Member functions, data members
Member functions, scope of data members
Data members, member functions
None of the given

·       Using encapsulation we can achieve
Select correct option:
Information hiding
Least interdependencies among modules
Implementation independence
All of given options

Information hiding can be achieved through__________.
·       Encapsulation, Inheritance
·       Encapsulation, Polymorphism
·       Encapsulation, Abstraction
·       Overloading
·        
·       A good model is ................ related to a real life problem.
·       Select correct option:
·       Loosely
·       Openly
·       Closely
·        
·        
·        
·        
·        
·       Which of the following features of OOP is used to derive a class from another?
·       Select correct option:
·       Encapsulation
·       Polymorphism
·       Data hiding
·       Inheritance
·        
·       Which of the following is a weak relationship between two objects?
·       Select correct option:
·       Inheritance
·       Composition
·       Aggregation
·       None of given
·        
·       Data items in a class must be private.
·       Select correct option:
·       True
·       False
·        
·       Which one is a class association?
·       Select correct option:
·       Simple Association
·       Inheritance
·       Composition
·       Aggregation
·        
·       Suppose there is an object of type Person, which of the following can be considered as one of its attributes
·       Select correct option:
·       Name
·       Age
·       Work()
·       Both Name and Age
·       Question # 8 of 10 ( Start time: 01:17:52 AM ) Total M a r k s: 1
·       Which one is not an object association?
·       Select correct option:
·       Simple association
·       Inheritance
·       Aggregation
·       Association
·        
·       Using encapsulation we can achieve
·       Select correct option:
·       Information hiding
·       Least interdependencies among modules
·       Implementation independence
·       All of given options
·        
·       In constant member function the type of this pointer is:
·       Select correct option:
·       Constant pointer
·       Constant pointer to object
·       Constant pointer to class
·       Constant pointer to constant object
·        
·       Which of the following is the way to extract common behavior and attributes from the given classes and make a separate class of those common behaviors and attributes?
·       Generalization
·       Sub-typing
·       Specialization
·       Extension
·        
·       The ability to derive a class from more than one class is called
·       Single inheritance
·       Encapsulation
·       Multiple inheritance
·       Polymorphism
·        
·       If MyClass has a destructor what is the destructor named?
·       MyClass
·       ~MyClass
·       My~Class
·       MyClass~
·        
·       Class abc{ ----- }; Is a valid class declaration?
·       yes
·       no
·        
·       Without using Deep copy constructor, A ____________ problem can occur
·       System crash
·       Memory Leakage
·       Dangling pointer
·       All of the given
·       If only one behaviour of a derived class is incompatible with base class, then it is:
·       Generalization
·       Specialization
·       Extension
·       Inheritance
·        
·       Which of the following may not be an integral part of an object?
·       state
·       behavior
·       Protected data members
·       All of given
·        
·       Only tangible things can be chosen as an object.
·       True
·       False
·       Class is not a mechanism to create objects and define user data types.
·       true
·       false
·      
Memory is allocated to non static members only, when:
·       Class is created
·       Object is defined
·       Object is initialized
·       Object is created
·      
The sub-object’s life is not dependent on the life of master class in ___________.
·       Composition
·       Aggregation
·       Separation
·       non of the given
·      
Unary operators and assignment operator are right associative.
·       true
·       false
·      

The >= operator can't be overloaded.
·       true
·       false
·      
_____ is creating objects of one class inside another class.
·       Association
·       Composition
·       Aggregation
·       Inheritance
·      
If we are create array of objects through new operator, then
·       We can call overloaded constructor through new
·       We can’t call overloaded constructor through new
·       We can call default constructor through new
·       None of the given
·      
Object can be declared constant with the use of Constant keyword.
·       true
·       false
·        
·       __________ Operator will take only one operand.
·       New
·       int
·       object
·       none of the given
·      
Which of the following operator(s) take(s) one or no argument if overloaded?
·       ++
·       *
·       %
·       All of the given choices
·      
this pointer does not pass implicitly to __________ functions.
·       Static Member
·       Non-Static Member
·       Instance Number
·       None of the given
·      

Operator overloading is
·       making C++ operators work with objects.
·       giving C++ operators more than they can handle.
·       giving new meanings to existing Class members.
·       making new C++ operators
·        
·       Which of the following is TRUE,
·       Derived class pointer can be used as Base class pointer
·       Base class pointer can be used as Derived class pointer
·       Both of these options
·       None of these options
·        
·       ___________ Binding means that target function for a call is selected at run time
·       Automatic
·       Dynamic
·       Static
·       Dramatic
·        
·       When we want to implement one class in terms of another class then we use
·       Public inheritance
·       Protected inheritance
·       Private inheritance
·       None of these options
·        
·       Consider the code below, class c1{ }; class c2 : public c1 { }; class c3 : public c2 { }; Then c2 is
·       Direct base class of c3
·       Direct child class of c3
·       Direct base class of c1
·       None of these
·        
·        
·       Consider the code below, class class1{ private: int i; }; class class2 : public class1 { }; Then int member i of class1 is ______ in class2,
·       Public
·       Protected
·       Private
·       None of the given options
·        
·       A parent class can call constructor of its child class through
·       Its constructor initialization list
·       Its constructor body
·       Both from its constructor initialization list or body
·       Can not call the constructor of its child class
·        
·       In Private Inheritance the public members of base class become __________ in derived class.
·       Public
·       Private
·       Protected
·       None of the given options
·        
·       Function overriding is done in context of,
·       Single class
·       Single derived class
·       Single base class
·       Derived and base classes
·        
·       Child class can call constructor of its,
·       Direct base class
·       Indirect base class
·       Both direct and indirect base classes
·       None of these
·        
·       Adding a derived class to a base class requires fundamental changes to the base class
·       True
·       False
·        
·       _______________ is automatically called when the object is created.
·       Member function
·       Object
·       Constructor
·       None of the given
·        
·       Inheritance is a way to
·       Organize data
·       Pass arguments to objects of classes
·       Add features to existing classes without rewriting them
·       Improved data-hiding and encapsulation
·        
·       Through interface we access object_____________.
·       States
·       Data members
·       Behaviour
·       None of the given
·        
·        
·       Which of the following may not be integral part of an object?
·       State
·       Behavior
·       Protected data members
·       All of given
·        
·       Suppose there is an object of type Person, which of the following can be considered as on of its attributes.
·       Name
·       Age
·       Work()
·       Both Name and Age
·        
·        
·       If we have an overloaded constrictor in our class, then compiler construct the default constructor.
·       True
·       False
·        
·       Advantages(s) of information hiding
·       Simplifies the model
·       Restriction to change
·       Both of above
·       None of the above
·        
·       If some of objects exhibit identical characteristics, then they belong to:
·       Different classes
·       Multiple classes
·       Same class
·       None of the given
·        
·       Which of the following is the way to extract common behaviour and attributes from the given and make a separate class of those common behaviours and attributes?
·       Generalization
·       Sub-typing
·       Specification
·       Extension
·        
·        
·       A class has ________ destructor
·       One
·       Two
·       Three
·        
·       Bahaviors of a type of objects are represented through
·       States
·       Attributes
·       Operations
·        
·       Which is not an example of multiple inheritances?
·       Mermaid
·       Amphibious Vehicle
·       Car
·       None of the above
·        
·       Static data members are called ____________ variable
·       Class
·       Object
·       Structure
·       None of the given
·        
·       Associatively can be change in operator overloading.
·       True
·       False
·        
·        
·       ________ and ______ methods may not be declared abstract.
·       Private,static
·       private,public
·       static,public
·       none of the given
·        
·        
·       Let Suppose a class Student with objects std1, std2, and std3. For the statement std3 =
·       std1 - std2 to work correctly, if the overloaded - operator must
·       take two arguments.
·       None of the given choices
·       take single argument
·       take three arguments
·        
·       To initialize an array of objects, only _____________ will be called
·       Default Constructor
·       Overloaded Constructor
·       Default Object
·       None of the above
·        
·       __________ provide the facility to access the data member.
·       accesser function
·       private function
·       inline function
·       None of the given
·        
·        
·        
·       If a class involves dynamic memory allocation, then:
·       Default copy constructor, shallow copy is implemented
·       User defined copy constructor, shallow copy is implemented
·       Default copy constructor, deep copy is implemented
·       User defined copy constructor, deep copy is implemented
·        
·       The sentence “Object Oriented Programming book in bookshelf” is an example of:
·       Association
·       Multiple associations
·       Aggregation
·        
·        
·       How the information hidden within an object can be accessed?
·       Through its interface
·       Through its private data member
·       Through its private member functions
·        
·        
·       There is no need to is or is a kind of relationship in generalization
·       True
·       False
·        
·       An object has _______ interface(s)
·       Only one
·       Only two
·       One or more than one
·        
·       Which of the following is an advantage of OOP?
·       It provides an ability to create one user defined data type extending the other
·       It provides the facility of defining abstract data type through which real entities can be defined better
·       All of the given option
·        
·       Encapsulation means
Select correct option:

Extending the behaviour of class in another class
Data and behaviour are tightly coupled within an entity 
One entity takes all the attributes and operations of the other
Taking out the common features and put those in a separate class 
·       We can allocate dynamic memory allocation through___________ key word.
Select correct option:
Static
Global
New 
Const
·       In programming, where the actual actions are coded is called:
Select correct option:

Function declaration
Function calling
Function definition
None of the given 
·       Which of the following is directly related to polymorphism?
Select correct option:
Overriding 
Const members
Static members
None of given
·        
·       In a class declaration, data or functions designated private are accessible
Select correct option:
to any function in the program.
only if you know the password.
to member functions of that class.  
only to public members of the class.  
·       An instance of user defined type is called
Select correct option:

Object
Class
both of above
none of above 
·       Aggregation is implemented using pointer.
Select correct option:
True
False
·        
·        
·       If class A supports all the operations of class B, then class A is:
·       Class A is behaviourally compatible with class B
·       Class A is behaviourally incompatible with class B
·       Class A is independent of class B
·       None of the given
·        
·        
·        
·       Objects having identical characteristics belong to ______________
·       Same class
·       Two different classes
·       Any number of different classes
·       Objects can not have identical characteristics


Post a Comment

0 Comments