CS304 – Object Oriented Programming: Midterm Important MCQs (399 Solved Questions)

Computer Science • Read every solved MCQ with its verified answer key directly on this page. Free, no login required.

All 664 Midterm Packs · CS304 Course Page · CS304 Subjective Pack (58 Q&As)

  1. Which of the following is a strong relationship?
    Topic: OOP Concepts, Classes & Objects
    1. Composition ✓ Correct answer
    2. Inheritance
    3. Association
    4. Polymorphism
  2. Which part of an object exhibits its state?
    Topic: OOP Concepts, Classes & Objects
    1. Data ✓ Correct answer
    2. Operations
    3. Any public part
    4. Any private part
  3. this pointers are not accessible for static member functions.
    Topic: OOP Concepts, Classes & Objects
    1. True ✓ Correct answer
    2. False
  4. ________ remain in memory even when all objects of a class have been destroyed.
    Topic: OOP Concepts, Classes & Objects
    1. Static variables ✓ Correct answer
    2. Instance variable
    3. Primitive variables
    4. None of given
  5. __________ is creating objects of one class inside another class.
    Topic: OOP Concepts, Classes & Objects
    1. Association
    2. Inheritance
    3. Aggregation
    4. Composition ✓ Correct answer
  6. We can get the address of a variable stored in a pointer using __________:
    Topic: OOP Concepts, Classes & Objects
    1. :symbol ✓ Correct answer
    2. :: symbol
    3. ->symbol
    4. & symbol
  7. Which of the following statement is NOT true about static variable of a class?
    Topic: OOP Concepts, Classes & Objects
    1. They are created even when there is no object of a class.
    2. Static variable belongs to a particular instance of a class. ✓ Correct answer
    3. Static variable is initialized once only throughout the program.
    4. They remain in memory even when all Objects of a class are destroyed.
  8. An instance of user defined type is called __________
    Topic: OOP Concepts, Classes & Objects
    1. Object ✓ Correct answer
    2. Class
    3. Variable
    4. Program
  9. If class B inherits from class A then it contains all characteristics of __________.
    Topic: OOP Concepts, Classes & Objects
    1. Class B
    2. None of the given option
    3. Class A ✓ Correct answer
    4. No inheritance
  10. Suppose there is an object of type Person, which of the following can be considered as one of its attributes
    Topic: OOP Concepts, Classes & Objects
    1. Name
    2. Age
    3. Work()
    4. Both Name and Age ✓ Correct answer
  11. Which of the following best describes relationship between Book and BookChapter classes?
    Topic: OOP Concepts, Classes & Objects
    1. Association
    2. Inheritance
    3. Aggregation
    4. Composition ✓ Correct answer
  12. Which of the following stores the address of a variable?
    Topic: OOP Concepts, Classes & Objects
    1. Pointer ✓ Correct answer
    2. Function
    3. Destructor
    4. Constructor
  13. Which of the following can be used as an alternative to static members?
    Topic: OOP Concepts, Classes & Objects
    1. Local Variables
    2. Array of Objects
    3. Global Variables ✓ Correct answer
    4. Constant Variables
  14. Composition is __________ and aggregation is ____________ relationship.
    Topic: OOP Concepts, Classes & Objects
    1. Weak, Weak
    2. Weak, Strong
    3. Strong, Weak ✓ Correct answer
    4. Strong, Strong
  15. Suppose "int a;" is a static data member of a class named test. Which of the following is the correct way of initializing the static variable outside the class test?
    Topic: OOP Concepts, Classes & Objects
    1. test a = 0;
    2. int test::a = 0; ✓ Correct answer
    3. int test->a = 0;
    4. int a::test = 0;
  16. Suppose we have a class named “Student”; which of the following statement is correctly declaring the pointer to the object for “Student” class?
    Topic: OOP Concepts, Classes & Objects
    1. Student obj;
    2. Student &obj;
    3. Student *obj; ✓ Correct answer
    4. *Student obj;
  17. If we extend our Object Oriented Model and the rest of model is not affected, this feature is called___________.
    Topic: OOP Concepts, Classes & Objects
    1. Flexibility ✓ Correct answer
    2. Reusability
    3. Efficiency
    4. Consistency
  18. Which of the following can be the behavior of an object "Usman"?
    Topic: OOP Concepts, Classes & Objects
    1. Eat ✓ Correct answer
    2. Address
    3. Name
    4. Age
  19. The sentence "Object Oriented Programming book in bookshelf" is an example of:
    Topic: OOP Concepts, Classes & Objects
    1. Binary association
    2. Association
    3. Multiple association
    4. Aggregation ✓ Correct answer
  20. In Object Oriented programming, objects communicate with each other through __________.
    Topic: OOP Concepts, Classes & Objects
    1. Messages ✓ Correct answer
    2. Data members
    3. Voice chat
    4. Ports
  21. __________ associates the objects of the exact three classes.
    Topic: OOP Concepts, Classes & Objects
    1. Binary Association
    2. Two way Association
    3. Ternary Association ✓ Correct answer
    4. N-ary Association
  22. There is/are ____ way(s) to create user defined types for objects in C++.
    Topic: OOP Concepts, Classes & Objects
    1. two ✓ Correct answer
    2. three
    3. four
    4. one
  23. Which of the following represents the two-way association?
    Topic: OOP Concepts, Classes & Objects
    1. All types of data members
    2. Ternary Association
    3. Constructor of the class
    4. Employee works for the company ✓ Correct answer
  24. How many objects of a given class may be constructed in an application?
    Topic: OOP Concepts, Classes & Objects
    1. Data member which is common to all the objects of a class
    2. class name, attributes, operation
    3. as many as the application ask for ✓ Correct answer
    4. They remain in memory even when all Objects of a class are destroyed.
  25. Which of the following keyword tells the compiler to substitute the code within the function definition for every instance of a function call?
    Topic: OOP Concepts, Classes & Objects
    1. inline ✓ Correct answer
    2. data member, Member function
    3. Instance variable
    4. To increase code re-usability
  26. All objects of same class has _______________ attributes.
    Topic: OOP Concepts, Classes & Objects
    1. They remain in memory even when all Objects of a class are destroyed.
    2. same ✓ Correct answer
    3. Data member which is common to all the objects of a class
    4. class name, attributes, operation
  27. Aggregation between objects shows that ____________
    Topic: OOP Concepts, Classes & Objects
    1. objects have weak relationship ✓ Correct answer
    2. Strong, Weak
    3. Weak, Strong
    4. Data member which is common to all the objects of a class
  28. How can we identify classes from a given problem statement?
    Topic: OOP Concepts, Classes & Objects
    1. by extracting nouns from problem statement ✓ Correct answer
    2. To enhance the communication between classes
    3. none of the given option
    4. Data member which is common to all the classes in a program
  29. Composition is a strong relationship because ______.
    Topic: OOP Concepts, Classes & Objects
    1. Composed object can exist independently
    2. Objects have weak relationship
    3. Composed object cannot exist independently ✓ Correct answer
    4. It is a one-way relationship
  30. The statement objA=objB; will cause a compiler error if the objects are of different classes.
    Topic: OOP Concepts, Classes & Objects
    1. True ✓ Correct answer
    2. False
  31. The technique in which we visualize our programming problems according to real life's problems is called .................
    Topic: OOP Concepts, Classes & Objects
    1. structured programming
    2. object oriented Programming ✓ Correct answer
    3. procedural programming
    4. non of the given
  32. In object orientated programming, a class of objects cans _____________ properties from another class of objects
    Topic: OOP Concepts, Classes & Objects
    1. Utilize
    2. Borrow
    3. Inherit ✓ Correct answer
    4. Adopt
  33. A C++ class is similar to --------------------
    Topic: OOP Concepts, Classes & Objects
    1. Structure ✓ Correct answer
    2. Header File
    3. Library File
    4. None of the given
  34. a’A static member function can be called, even when a class is not __________.
    Topic: OOP Concepts, Classes & Objects
    1. Declared
    2. Define
    3. Instantiated ✓ Correct answer
    4. Called
  35. Constant objects cannot change their state,
    Topic: OOP Concepts, Classes & Objects
    1. True ✓ Correct answer
    2. False
  36. The _________ relationship indicates that an object contains other objects.
    Topic: OOP Concepts, Classes & Objects
    1. None of given ✓ Correct answer
    2. ‘has-a’
    3. ‘is-a’
    4. ‘be-
  37. Static variables act like a global variable in the context or scope of the class.
    Topic: OOP Concepts, Classes & Objects
    1. True ✓ Correct answer
    2. False
  38. In OOP a class is an example of ______ .
    Topic: OOP Concepts, Classes & Objects
    1. Data Type
    2. Abstract Type
    3. User Defined Type ✓ Correct answer
    4. None of the given
  39. ________ is/are used to access information hidden within an object?
    Topic: OOP Concepts, Classes & Objects
    1. Interface
    2. Private data members
    3. Private member functions ✓ Correct answer
    4. Both public and private members
  40. Given the following class class Base{ int Age=33; } How you can improve above class with respect to accessing the field Age?
    Topic: OOP Concepts, Classes & Objects
    1. Define the variable Age as private
    2. Define the variable Age as protected
    3. Define the variable Age as private and create a get method that returns it and a set method that updates it ✓ Correct answer
    4. Define the variable Age as protected and create a set method that returns it and a get method that updates it
  41. The life of sub object is not dependant on the life of master class in ____________.
    Topic: OOP Concepts, Classes & Objects
    1. Composition
    2. Aggregation ✓ Correct answer
    3. Separation
    4. None of the given
  42. Which of the following statement is TRUE about a class's Static Member Function?
    Topic: OOP Concepts, Classes & Objects
    1. It can access non-static data members.
    2. It is used to access static data members only. ✓ Correct answer
    3. It can only be called by a particular object of class.
    4. It can access constant data members of the class.
  43. Which of the following is the correct syntax of declaring static variable “count” of type int?
    Topic: OOP Concepts, Classes & Objects
    1. int static count;
    2. int count static;
    3. static count int;
    4. static int count; ✓ Correct answer
  44. Which of the following creates the strongest relationship between two objects?
    Topic: OOP Concepts, Classes & Objects
    1. Association
    2. Inheritance
    3. Composition ✓ Correct answer
    4. Aggregation
  45. Static data members are shared by _____ of the class.
    Topic: OOP Concepts, Classes & Objects
    1. Public data members
    2. All types of data members ✓ Correct answer
    3. Private data members
    4. Protected data members
  46. Interaction of different objects in OO model is known as _______.
    Topic: OOP Concepts, Classes & Objects
    1. Encapsulation
    2. Abstraction
    3. Association ✓ Correct answer
    4. Inheritance
  47. Which of the following can be the attribute of the Employee class?
    Topic: OOP Concepts, Classes & Objects
    1. Roll Number
    2. Course
    3. Salary ✓ Correct answer
    4. GPA
  48. Which of the following offers a programmer the facility of using a specific class object into other classes?
    Topic: OOP Concepts, Classes & Objects
    1. Inheritance
    2. Polymorphism
    3. Composition ✓ Correct answer
    4. Abstraction
  49. Which of the following best defines static data members of a class?
    Topic: OOP Concepts, Classes & Objects
    1. Data member which is allocated for each object separately
    2. Data member with global scope
    3. Data member which is common to all the classes in a program
    4. Data member which is common to all the objects of a class ✓ Correct answer
  50. Following code is equivalent to which option.
    Topic: OOP Concepts, Classes & Objects
    1. class Shape { public: string type; };
    2. class Shape { private: string type; }; ✓ Correct answer
    3. class Shape { protected: string type; };
    4. class Shape public: { public: string type; };
  51. Consider the following class A{int a,b,c; public: A():B(10),C(0)a(7) };
    Topic: OOP Concepts, Classes & Objects
    1. Concrete Class
    2. Class B
    3. Derived Class
    4. A,b,c ✓ Correct answer
  52. Class is a blue print of
    Topic: OOP Concepts, Classes & Objects
    1. Objects ✓ Correct answer
    2. facilitating class libraries.
    3. Whole, part
    4. Polymorphism
  53. Which of the following Depicts the proper definition of class?
    Topic: OOP Concepts, Classes & Objects
    1. They are created even when there is no object of a class.
    2. It can only be called by a particular object of class.
    3. a class is description of a kind of object ✓ Correct answer
    4. It can access constant data members of the class.
  54. Entities in OO model are represented by
    Topic: OOP Concepts, Classes & Objects
    1. polymorphism
    2. C1*c2
    3. global
    4. Rectangle ✓ Correct answer
  55. ---- is the relationship between the part object and the whole object
    Topic: OOP Concepts, Classes & Objects
    1. a class is description of a kind of object
    2. both states and attributes of an object
    3. Composition ✓ Correct answer
    4. Any private part
  56. which of the following classes are used by amphibious vehicle to inherit characteristics
    Topic: OOP Concepts, Classes & Objects
    1. To use the functionality of one class into derived classes
    2. Both public and private members
    3. both states and attributes of an object
    4. both land and water vehicle ✓ Correct answer
  57. object data includes
    Topic: OOP Concepts, Classes & Objects
    1. Data member which is allocated for each object separately
    2. Both public and private members
    3. a class is description of a kind of object
    4. both states and attributes of an object ✓ Correct answer
  58. which of the following is part of the Class diagram
    Topic: OOP Concepts, Classes & Objects
    1. They remain in memory even when all Objects of a class are destroyed.
    2. all of the given option ✓ Correct answer
    3. nested class
    4. Data member which is common to all the objects of a class
  59. Which one is not the main features of object oriented programming?
    Topic: OOP Concepts, Classes & Objects
    1. exception handling ✓ Correct answer
    2. They are created even when there is no object of a class.
    3. a one-argument constructor.
    4. To use the functionality of one class into derived classes
  60. static data member is declared
    Topic: OOP Concepts, Classes & Objects
    1. data member, Member function
    2. static data members
    3. inside the class ✓ Correct answer
    4. Data member which is common to all the objects of a class
  61. Which of the following can we attribute of an object "Ali"?
    Topic: OOP Concepts, Classes & Objects
    1. both states and attributes of an object
    2. a class is description of a kind of object
    3. Data member which is allocated for each object separately
    4. address ✓ Correct answer
  62. how many objects are involved in the binary Association
    Topic: OOP Concepts, Classes & Objects
    1. 2 ✓ Correct answer
    2. 1
    3. 4
    4. 3
  63. which of the following will happen when a constant function tried to change the value of data members of the class
    Topic: OOP Concepts, Classes & Objects
    1. It can access constant data members of the class.
    2. Public data members
    3. it is used to access static data members
    4. compile time error will occur ✓ Correct answer
  64. How the information hidden within an object can be accessed?
    Topic: OOP Concepts, Classes & Objects
    1. They are created even when there is no object of a class.
    2. through its interface ✓ Correct answer
    3. information hiding
    4. It can only be called by a particular object of class.
  65. object orientation approach can be achieved using object and their-------
    Topic: OOP Concepts, Classes & Objects
    1. Data member which is allocated for each object separately
    2. a class is description of a kind of object
    3. It can only be called by a particular object of class.
    4. interactions ✓ Correct answer
  66. memory is allocated to non-static members only when
    Topic: OOP Concepts, Classes & Objects
    1. Static typing
    2. Static memory allocation
    3. object is created ✓ Correct answer
    4. private members of Derv.
  67. in class B inherit from class A which of the following is child class
    Topic: OOP Concepts, Classes & Objects
    1. class B ✓ Correct answer
    2. Constructor
    3. ‘has-a’
    4. Consistency
  68. Consider the statement" room has chair" which of the following type of Association exists between whom and chair?
    Topic: OOP Concepts, Classes & Objects
    1. To enhance the communication between classes
    2. aggregation ✓ Correct answer
    3. Two way Association
    4. by extracting nouns from problem statement
  69. which of the following is a tangible entity
    Topic: OOP Concepts, Classes & Objects
    1. Polymarphism
    2. encapsulation
    3. Car ✓ Correct answer
    4. Static typing
  70. data member(s) of a class Student can be
    Topic: OOP Concepts, Classes & Objects
    1. Data member with global scope
    2. Data member which is common to all the objects of a class
    3. All of the given options ✓ Correct answer
    4. All types of data members
  71. Class diagram include
    Topic: OOP Concepts, Classes & Objects
    1. both states and attributes of an object
    2. Destructor of the class
    3. class name, attributes, operation ✓ Correct answer
    4. a class is description of a kind of object
  72. through interface was access objects------ --
    Topic: OOP Concepts, Classes & Objects
    1. through its interface
    2. objects have week relationship
    3. behavior ✓ Correct answer
    4. It is used to access static data members only.
  73. in class attributes and behaviors are represented by---- and--- respectively
    Topic: OOP Concepts, Classes & Objects
    1. It can access constant data members of the class.
    2. data members, member functions ✓ Correct answer
    3. Data member which is common to all the objects of a class
    4. All types of data members
  74. a class defined within another class is
    Topic: OOP Concepts, Classes & Objects
    1. Abstract Class
    2. class B
    3. Destructor of the class
    4. nested class ✓ Correct answer
  75. the compiler treats the Member function of a class as
    Topic: OOP Concepts, Classes & Objects
    1. Data member which is common to all the objects of a class
    2. a conversion operator that’s a member of the class.
    3. inline function ✓ Correct answer
    4. data member, Member function
  76. an object has attributes operation ,and--- ----
    Topic: OOP Concepts, Classes & Objects
    1. class name, attributes, operation
    2. unique identity ✓ Correct answer
    3. both states and attributes of an object
    4. They are created even when there is no object of a class.
  77. the car is composed of wheels what is the relationship between car and wheels?
    Topic: OOP Concepts, Classes & Objects
    1. address
    2. To enhance the communication between classes
    3. objects have week relationship
    4. composition ✓ Correct answer
  78. which of the following can be created without any object of a class?
    Topic: OOP Concepts, Classes & Objects
    1. Data member which is allocated for each object separately
    2. They are created even when there is no object of a class.
    3. a class is description of a kind of object
    4. static data members ✓ Correct answer
  79. member functions defined inside a class declaration are------- by default
    Topic: OOP Concepts, Classes & Objects
    1. private ✓ Correct answer
    2. Static member function
    3. Static data member
    4. Protected
  80. this pointer cannot be passed implicitly to-------- functions
    Topic: OOP Concepts, Classes & Objects
    1. Member functions can be made private
    2. static member ✓ Correct answer
    3. initialize data member
    4. functions and classes
  81. relationship in which child object gets destroyed if parent object is destroyed
    Topic: OOP Concepts, Classes & Objects
    1. Data member which is allocated for each object separately
    2. They remain in memory even when all Objects of a class are destroyed.
    3. composition ✓ Correct answer
    4. It can only be called by a particular object of class.
  82. object oriented programming is better than procedural programming because:
    Topic: OOP Concepts, Classes & Objects
    1. a class is description of a kind of object
    2. Data member which is allocated for each object separately
    3. both states and attributes of an object
    4. it is more close to reality ✓ Correct answer
  83. A good model is------ related to life problem
    Topic: OOP Concepts, Classes & Objects
    1. Function definition
    2. Destructor
    3. closely ✓ Correct answer
    4. Semi colon
  84. in constant Member function the type of this pointer is
    Topic: OOP Concepts, Classes & Objects
    1. Data members can't be inherited
    2. The compiler can only generate copy for the int type data
    3. initialize data member
    4. constant pointer to constant data ✓ Correct answer
  85. ----- is set of function of an object exposed of other objects
    Topic: OOP Concepts, Classes & Objects
    1. interface ✓ Correct answer
    2. inline function
    3. It can only be called by a particular object of class.
    4. They remain in memory even when all Objects of a class are destroyed.
  86. a fan has wings, which type of relation exists between fan and Wings in this sentence
    Topic: OOP Concepts, Classes & Objects
    1. Friend Class
    2. composition ✓ Correct answer
    3. State
    4. To enhance the communication between classes
  87. which of the following statement is true about static function of a class
    Topic: OOP Concepts, Classes & Objects
    1. All types of data members
    2. it is used to access static data members ✓ Correct answer
    3. Protected data members
    4. data members, member functions
  88. Suppose you have been given the following design, "A person has a name, age, address and sex. You are designing a class to represent a type of person called a patient. This kind of person may be given a diagnosis, have a spouse and may be alive". Given that the person class has already been created, what of the following would be appropriate to include when you design the patient class?
    Topic: OOP Concepts, Classes & Objects
    1. registration date and diagnosis ✓ Correct answer
    2. age and sex
    3. sex and diagnosis
    4. diagnosis and age
  89. Static variable can be initialized more than once.
    Topic: OOP Concepts, Classes & Objects
    1. True ✓ Correct answer
    2. False
  90. We can get only one unique value which can be used by all the objects of that class by the use of,
    Topic: OOP Concepts, Classes & Objects
    1. static variables ✓ Correct answer
    2. dynamic variables
    3. instance variables
    4. data members
  91. Static variable can be initialized more than once. True False (Page 107)
    Topic: OOP Concepts, Classes & Objects
    1. True
    2. False ✓ Correct answer
  92. A class can be identified from a statement by -------------
    Topic: OOP Concepts, Classes & Objects
    1. Noun ✓ Correct answer
    2. Pronoun
    3. Verb
    4. Adverb
  93. The members of a class that can be accessed without creating the object of the class is called
    Topic: OOP Concepts, Classes & Objects
    1. Private member
    2. Data Member
    3. Public Member
    4. Static ✓ Correct answer
  94. C++ compiler does not allow to dynamically allocate memory for objects
    Topic: OOP Concepts, Classes & Objects
    1. False ✓ Correct answer
    2. True
  95. Your chief Software designer has shown you a sketch of the new Computer parts system she is about to create. At the top of the hierarchy is a Class called Computer and under this are two child classes. One is called LinuxPC and one is called WindowsPC. The main difference between the two is that one runs the Linux operating System and the other runs the Windows System (of course another difference is that one needs constant re-booting and the other runs reliably). Under the WindowsPC are two Sub classes one called Server and one Called Workstation. How might you appraise your designers work?
    Topic: OOP Concepts, Classes & Objects
    1. Give the goahead for further design using the current scheme
    2. Ask for a re-design of the hierarchy with changing the Operating System to a field rather than Class type ✓ Correct answer
    3. Ask for the option of WindowsPC to be removed as it will soon be obsolete
    4. Change the hierarchy to remove the need for the superfluous Computer Class.
  96. When a variable is define as static in a class then all object of this class,
    Topic: OOP Concepts, Classes & Objects
    1. Have different copies of this variable
    2. Have same copy of this variable ✓ Correct answer
    3. Can not access this variable
    4. None of given
  97. A template provides a convenient way to make a family of
    Topic: OOP Concepts, Classes & Objects
    1. variables and data members
    2. functions and classes ✓ Correct answer
    3. classes and exceptions
    4. programs and algorithms
  98. Classes like TwoDimensionalShape and ThreeDimensionalShape would normally be concrete, while classes like Sphere and Cube would normally be abstract.
    Topic: OOP Concepts, Classes & Objects
    1. True
    2. False ✓ Correct answer
  99. In order to define a class template, the first line of definition must be:
    Topic: OOP Concepts, Classes & Objects
    1. template <typename T> ✓ Correct answer
    2. typename <template T>
    3. Template Class <ClassName>
    4. Class <Template T>
  100. Which of the following may not be an integral part of an object?
    Topic: OOP Concepts, Classes & Objects
    1. State
    2. Behavior
    3. Protected data members ✓ Correct answer
    4. All of given
  101. We can access a private static data member of a class through _________________.
    Topic: OOP Concepts, Classes & Objects
    1. Static data member ✓ Correct answer
    2. Global data member
    3. Static member function
    4. Global member function
  102. If you do not initialize static data member of a class of int type, it is automatically initialized with _________.
    Topic: OOP Concepts, Classes & Objects
    1. 0 ✓ Correct answer
    2. 1
    3. Null
    4. -32767
  103. Which of the following is used to perform some useful work between object in OOP?
    Topic: OOP Concepts, Classes & Objects
    1. aggregation
    2. inheritance
    3. encapsulation
    4. association ✓ Correct answer
  104. How many types of Association is OOP?
    Topic: OOP Concepts, Classes & Objects
    1. 1
    2. 2 ✓ Correct answer
    3. 3
    4. 4
  105. Suppose there is an object of type Class, which of the following can be considered as one of its function
    Topic: OOP Concepts, Classes & Objects
    1. changeName ( );
    2. changeSection ( );
    3. changeIncharge ( );
    4. All of the given ✓ Correct answer
  106. The relationship between container and contained objects is called ____________.
    Topic: OOP Concepts, Classes & Objects
    1. Association
    2. Aggregation ✓ Correct answer
    3. Inheritance
    4. Composition
  107. Why do we need relationships between classes?
    Topic: OOP Concepts, Classes & Objects
    1. To increase code re-usability
    2. All of the given option ✓ Correct answer
    3. To use the functionality of one class into derived classes
    4. To enhance the communication between classes
  108. Which of the following keyword should be used to declare a static variable?
    Topic: OOP Concepts, Classes & Objects
    1. stat
    2. global
    3. const
    4. static ✓ Correct answer
  109. In OOP, static data members of a class are called ______________ variables.
    Topic: OOP Concepts, Classes & Objects
    1. Class ✓ Correct answer
    2. Object
    3. Structure
    4. Function
  110. Which of the following class cannot exist standalone in an object model?
    Topic: OOP Concepts, Classes & Objects
    1. Concrete Class
    2. Abstract Class ✓ Correct answer
    3. Friend Class
    4. Derived Class
  111. What will be the value of variables a,b, and c after instantiating an object of the given class?
    Topic: OOP Concepts, Classes & Objects
    1. 5, 5, 5
    2. Junk value, 5, Junk value ✓ Correct answer
    3. 5, Junk value, 5
    4. Junk value, 5, 5
  112. Suppose we have a class named "Test" and void show() is one of its public member function. Which of the following is a correct way to call show() function using Test pointer ptr?
    Topic: OOP Concepts, Classes & Objects
    1. ptr:show(); ✓ Correct answer
    2. ptr::show();
    3. ptr.show();
    4. ptr ->show();
  113. "Static data member is declared ___ the class, but they are defined ___ the class."
    Topic: OOP Concepts, Classes & Objects
    1. Outside, Outside
    2. Outside, Inside
    3. Inside, Inside
    4. Inside, Outside ✓ Correct answer
  114. Consider the following code and choose the correct order of initialization for the data members of the class.
    Topic: OOP Concepts, Classes & Objects
    1. a,c,b
    2. c,a,b
    3. a,b,c ✓ Correct answer
    4. b,a,c
  115. Which of the following is a weak relationship?
    Topic: OOP Concepts, Classes & Objects
    1. Aggregation
    2. Association ✓ Correct answer
    3. Composition
    4. Inheritance
  116. A doctor can see patients. This type of relationship is known as _________.
    Topic: OOP Concepts, Classes & Objects
    1. Binary Association
    2. Two-way Association
    3. One-way Association ✓ Correct answer
    4. Ternary Association
  117. "Static data member is declared ___ the class, but they are defined ___ the class." Choose the correct sequence of data member declaration and definition.
    Topic: OOP Concepts, Classes & Objects
    1. Outside, Outside
    2. Outside, Inside
    3. Inside, Inside
    4. Inside, Outside ✓ Correct answer
  118. Consider the following code and choose the correct order of initialization for the data members of the class. class A { int a,b,c; public: A(): b(10), c(0), a(7){ } };
    Topic: OOP Concepts, Classes & Objects
    1. a,c,b
    2. c,a,b
    3. a,b,c ✓ Correct answer
    4. b,a,c
  119. Through ___________, Objects communicate with outer world.
    Topic: OOP Concepts, Classes & Objects
    1. Polymorphism
    2. Interface ✓ Correct answer
    3. Encapsulation
    4. Inheritance
  120. Static data members are called __________ variables.
    Topic: OOP Concepts, Classes & Objects
    1. Class ✓ Correct answer
    2. Structure
    3. Object
    4. None of the given
  121. Through interface we represent object's _________________.
    Topic: OOP Concepts, Classes & Objects
    1. through its interface
    2. a class is description of a kind of object
    3. Behaviour ✓ Correct answer
    4. It can only be called by a particular object of class.
  122. "Student registers Course and Teacher teaches the Course." is an example of ____________.
    Topic: OOP Concepts, Classes & Objects
    1. Single inheritance
    2. protected members of Derv.
    3. Multiple association
    4. Binary Association ✓ Correct answer
  123. In composition ____________ are called from composing objects to composed objects.
    Topic: Constructors & Destructors
    1. Pointers
    2. Destructors ✓ Correct answer
    3. Constructors
    4. Member Functions
  124. Destructor is a function which has the same name as that of class, but starts with a ____________ sign.
    Topic: Constructors & Destructors
    1. $
    2. ~ ✓ Correct answer
    3. #
    4. %
  125. What problem(s) may occur when we copy objects without using deep copy constructor?
    Topic: Constructors & Destructors
    1. Dangling pointer
    2. Memory Leakage
    3. All of the given ✓ Correct answer
    4. System crash
  126. Copy constructor is called when:
    Topic: Constructors & Destructors
    1. An object is deleted.
    2. An object is created.
    3. An array of objects is created.
    4. An object is created in term of pre existing object. ✓ Correct answer
  127. Constructors have _____ return type.
    Topic: Constructors & Destructors
    1. int
    2. no ✓ Correct answer
    3. char
    4. void
  128. How can we differentiate between constructors and destructors?
    Topic: Constructors & Destructors
    1. Destructors are exactly same as Constructors in syntax.
    2. Destructors can't be defined by the programmer, but Constructors can be defined by the programmer.
    3. Destructors have a return type but Constructors do not have return type.
    4. Destructors are preceded with a tilde (~) symbol, and Constructors are not preceded with any symbol. ✓ Correct answer
  129. Constructor without any parameter is called ____________________.
    Topic: Constructors & Destructors
    1. constructor is used to initialize the data members of a class
    2. Constructor does not have return type
    3. Constructor can be a constant function
    4. Default constructor ✓ Correct answer
  130. In order to free the memory occupied by the object, we use ____________ .
    Topic: Constructors & Destructors
    1. Constructor
    2. Destructor ✓ Correct answer
    3. Shallow Copy
    4. Deep Copy
  131. We can use "this" pointer in the constructor in the body and even in the initialization list of any class if we are careful,
    Topic: Constructors & Destructors
    1. True
    2. False ✓ Correct answer
  132. which of the following define default constructor 5 class student
    Topic: Constructors & Destructors
    1. student(){//..} ✓ Correct answer
    2. Constructor can be a constant function
    3. compiler will call implicit default constructor
    4. constructor is used to initialize the data members of a class
  133. compiler generated defaulter structure is called----- hand user written default constructor is called----
    Topic: Constructors & Destructors
    1. Constructor does not have return type
    2. compiler will call implicit default constructor
    3. Constructor can be a constant function
    4. implicit, explicit ✓ Correct answer
  134. Suppose a class does not have any constructor what will happen when an object of this class is created?
    Topic: Constructors & Destructors
    1. compiler will call implicit default constructor ✓ Correct answer
    2. An object is created in term of pre existing object.
    3. Constructor is used to initialize data members of a class.
    4. An object is created.
  135. when an object is initialized, is automatically called by the compiler
    Topic: Constructors & Destructors
    1. constructor ✓ Correct answer
    2. all of the given option
    3. An object is created.
    4. An object is created in term of pre existing object.
  136. which of the following statement best describes the constructor
    Topic: Constructors & Destructors
    1. Default constructor
    2. Constructors are commonly public members of a class.
    3. compiler will call implicit default constructor
    4. constructor is used to initialize the data members of a class ✓ Correct answer
  137. There are ------ types of constructor in C++
    Topic: Constructors & Destructors
    1. 3 ✓ Correct answer
    2. compiler will call implicit default constructor
    3. Constructor is used to initialize data members of a class.
    4. Default constructor
  138. suppose student is a class, which of the following defines constructor with one parameter for class student
    Topic: Constructors & Destructors
    1. compiler will call implicit default constructor
    2. constructor is used to initialize the data members of a class
    3. student(char*aName); ✓ Correct answer
    4. Default constructor
  139. Supposed derived class is inherited from base class what happens when a derived class object is created
    Topic: Constructors & Destructors
    1. Constructor is used to initialize data members of a class.
    2. the constructor of base class exact is executed before the constructor of derived class ✓ Correct answer
    3. An object is created.
    4. An object is created in term of pre existing object.
  140. which of the following is true about constructor
    Topic: Constructors & Destructors
    1. Default constructor
    2. compiler will call implicit default constructor
    3. all of the given option ✓ Correct answer
    4. Constructor does not have return type.
  141. A member function having the same name as that of a class and a ~ sign with it is called,
    Topic: Constructors & Destructors
    1. Constructor
    2. Getter
    3. Setter
    4. Destructor ✓ Correct answer
  142. Consider the code below, class Fred { public: Fred(); ... }; int main() { Fred a[10]; Fred* p = new Fred[10]; ... } Select the best option,
    Topic: Constructors & Destructors
    1. Fred a[10]; calls the default constructor 09 times Fred* p = new Fred[10]; calls the default constructor 10 times
    2. Produce an error
    3. Fred a[10]; calls the default constructor 11 times Fred* p = new Fred[10]; calls the default constructor 11 times
    4. Fred a[10]; calls the default constructor 10 times Fred* p = new Fred[10]; calls the default constructor 10 times ✓ Correct answer
  143. Which of the following is NOT true about constructor?
    Topic: Constructors & Destructors
    1. Constructor is a special function having the same name as the class name
    2. Constructor does not have return type
    3. Constructors are commonly public members
    4. Constructor can be a constant function ✓ Correct answer
  144. Which of the following is NOT true about constructor?
    Topic: Constructors & Destructors
    1. Constructors are commonly public members of a class.
    2. Constructor is used to initialize data members of a class.
    3. Constructor is a special function which can have different name than class name. ✓ Correct answer
    4. Constructor does not have return type.
  145. __________ is automatically called when the object is created.
    Topic: Constructors & Destructors
    1. member function
    2. object
    3. constructor ✓ Correct answer
    4. None of the given
  146. A class can have only ___________ destructor(s).
    Topic: Constructors & Destructors
    1. 3
    2. One ✓ Correct answer
    3. Constructor is used to initialize data members of a class.
    4. Constructors are commonly public members of a class.
  147. Inheritance is a way to
    Topic: Inheritance
    1. organize data.
    2. pass arguments to objects of classes.
    3. add features to existing classes without rewriting them. ✓ Correct answer
    4. improve data-hiding and encapsulation.
  148. Which of the following is not an example of multiple inheritances?----------
    Topic: Inheritance
    1. Mermaid
    2. Woman ✓ Correct answer
    3. Amphibious Vehicle
    4. None of the given
  149. The concept of derived classes is involved in,
    Topic: Inheritance
    1. inheritance ✓ Correct answer
    2. encapsulation
    3. structure
    4. array
  150. Which problem arises due to multiple inheritance, when the parent classes are also derived from the grandparent class?
    Topic: Inheritance
    1. Circle
    2. Diamond ✓ Correct answer
    3. Triangle
    4. Loop
  151. The process of extracting common characteristics from two or more classes and combining them into a generalized superclass is called ____________.
    Topic: Inheritance
    1. Generalization ✓ Correct answer
    2. Specialization
    3. Abstraction
    4. Composition
  152. Which one of the following features of OOP is used to derive a class from another?
    Topic: Inheritance
    1. Encapsulation
    2. Polymorphism
    3. Data hiding
    4. Inheritance ✓ Correct answer
  153. A generalization-specialization relation between classes are implemented using __________ .
    Topic: Inheritance
    1. data hiding
    2. friend classes
    3. encapsulation
    4. inheritance ✓ Correct answer
  154. What a derived class can add?
    Topic: Inheritance
    1. New data members
    2. New member functions and New friend functions
    3. New constructors and destructor
    4. All of given ✓ Correct answer
  155. Which one of the following is not an object association?
    Topic: Inheritance
    1. Simple Assocation
    2. Inheritance ✓ Correct answer
    3. Aggregation
    4. Composition
  156. In C++, Composition is a relationship between ____________ and _______________ objects.
    Topic: Inheritance
    1. Whole, part ✓ Correct answer
    2. Parent, child
    3. Base, derived
    4. All given options are correct.
  157. Which of the following method allows to reuse the characteristics of more than one parent class?
    Topic: Inheritance
    1. Polymorphism
    2. Multiple Inheritance ✓ Correct answer
    3. Specialization
    4. Single inheritance
  158. Generalization is implemented through:
    Topic: Inheritance
    1. Polymorphism
    2. Composition
    3. Aggregation
    4. Inheritance ✓ Correct answer
  159. In _______, Base class can't always be replaced by the derived class.
    Topic: Inheritance
    1. specialization ✓ Correct answer
    2. Base, derived
    3. facilitating class libraries.
    4. protected members of Base.
  160. ____________ is a concept to extract common behaviours by using Bottom to Top approach.
    Topic: Inheritance
    1. Generalization ✓ Correct answer
    2. Sub-typing
    3. Extension
    4. Specialization
  161. In OOP, which of the following feature is used to derive a class from another class?
    Topic: Inheritance
    1. Inheritance ✓ Correct answer
    2. Polymorphism
    3. Data hiding
    4. Encapsulation
  162. --------------- represent "IS A" relationship
    Topic: Inheritance
    1. Inheritance ✓ Correct answer
    2. Operator overloading
    3. User Defined Type
    4. friend
  163. minimum classes required in a program for implementing multiple inheritance
    Topic: Inheritance
    1. 1
    2. Single inheritance
    3. 3 ✓ Correct answer
    4. 0
  164. in------- base class can be replaced by the derived class
    Topic: Inheritance
    1. facilitating class libraries.
    2. protected members of Base.
    3. Base, derived
    4. extension ✓ Correct answer
  165. inheritance is the relationship between
    Topic: Inheritance
    1. classes ✓ Correct answer
    2. Sub-typing
    3. Single inheritance
    4. Polymarphism
  166. inheritance is shown by
    Topic: Inheritance
    1. filled arrow ✓ Correct answer
    2. protected
    3. Single inheritance
    4. virtual
  167. generalization is-------- approach
    Topic: Inheritance
    1. bottom-up ✓ Correct answer
    2. Vehicle
    3. Constructor
    4. specialization
  168. the other name of specialization is-------
    Topic: Inheritance
    1. restriction ✓ Correct answer
    2. Both Name and Age
    3. all of the given option
    4. Compatible
  169. the other name of subtyping is
    Topic: Inheritance
    1. Extension ✓ Correct answer
    2. Public members are accessible from other classes also
    3. Class
    4. Implicit
  170. in generalization general class represents the -------- behavior of the class
    Topic: Inheritance
    1. facilitating class libraries.
    2. Aggregation
    3. common ✓ Correct answer
    4. Loop
  171. multiple inheritance is implemented between class through------ symbol
    Topic: Inheritance
    1. int test::a = 0;
    2. comma(,) ✓ Correct answer
    3. Work()
    4. ptr:show();
  172. _______ is a relationship
    Topic: Inheritance
    1. Inheritance ✓ Correct answer
    2. Polymarphism
    3. abstraction
    4. encapsulation
  173. A generic class showing all the common attributes and a behavior of other classes represents a very important feature in oop called --------
    Topic: Inheritance
    1. Inheritance ✓ Correct answer
    2. Encapsulation
    3. Polymarphism
    4. Abstraction
  174. template <> class Vector<char*> { } This is an example of partial specialization.
    Topic: Inheritance
    1. True ✓ Correct answer
    2. False
  175. Assume a class Derv that is privately derived from class Base. An object of class Derv located in main() can access
    Topic: Inheritance
    1. public members of Derv. ✓ Correct answer
    2. protected members of Derv.
    3. private members of Derv.
    4. protected members of Base.
  176. Which is not the Advantage of inheritance?
    Topic: Inheritance
    1. providing class growth through natural selection.
    2. facilitating class libraries.
    3. avoiding the rewriting of code. ✓ Correct answer
    4. providing a useful conceptual framework.
  177. What is the access specifier used to specify that the members of a base class are accessible in the derived class but not to the outside world?
    Topic: Inheritance
    1. public
    2. private
    3. protected ✓ Correct answer
    4. friend
  178. Car carries passengers. Bus carries passengers. Truck carries luggage. Harvester harvests the crops. Car, Bus, Harvester and Truck are derived from which class?
    Topic: Inheritance
    1. Public Transport
    2. Passenger Transport
    3. Vehicle ✓ Correct answer
    4. Navy Ships
  179. Specialization means that derived class is behaviorally __________ with the base class.
    Topic: Inheritance
    1. Same
    2. Compatible
    3. Different
    4. Incompatible ✓ Correct answer
  180. __________ is the reverse process of Generalization.
    Topic: Inheritance
    1. Aggregation
    2. Inheritance
    3. Dependence
    4. Specialization ✓ Correct answer
  181. In OOP, we can achieve reusability through __________.
    Topic: Inheritance
    1. False
    2. Triangle
    3. Inheritance ✓ Correct answer
    4. receiver
  182. Identify the abstract class from the given statement: "Vehicle class is base class. Bus, Car, and Truck are derived classes."
    Topic: Inheritance
    1. Base, derived
    2. None of the given
    3. All of given
    4. Vehicle ✓ Correct answer
  183. Mermaid is an example of _________.
    Topic: Inheritance
    1. Overriding
    2. Single inheritance ✓ Correct answer
    3. Multiple association
    4. Whole, part
  184. A static member function cannot be declared.
    Topic: Polymorphism & Virtual Functions
    1. Static
    2. Implicit
    3. Explicit
    4. Virtual ✓ Correct answer
  185. ____________ satisfy the condition of polymorphism.
    Topic: Polymorphism & Virtual Functions
    1. Carbon
    2. Diamond
    3. Coal
    4. all of the given ✓ Correct answer
  186. in polymorphism messenger can be interpreted in different ways depending upon the----- class
    Topic: Polymorphism & Virtual Functions
    1. 1
    2. facilitating class libraries.
    3. Triangle
    4. receiver ✓ Correct answer
  187. In which of the following different forms office single entity exist?
    Topic: Polymorphism & Virtual Functions
    1. Dynamic allocation
    2. composed object can not exist independently
    3. polymorphism ✓ Correct answer
    4. Single inheritance
  188. polymorphism makes the system
    Topic: Polymorphism & Virtual Functions
    1. all of the given option ✓ Correct answer
    2. protected members of Base.
    3. Binary Association
    4. None of the given
  189. The derived class inherits behavior from the base class and also exhibits its own behavior. this concept is known as---
    Topic: Polymorphism & Virtual Functions
    1. Base, derived
    2. facilitating class libraries.
    3. protected members of Base.
    4. Overriding ✓ Correct answer
  190. Which one of the following terms must relate to polymorphism?
    Topic: Polymorphism & Virtual Functions
    1. Static allocation
    2. Static typing
    3. Dynamic binding Click here for more detail ✓ Correct answer
    4. Dynamic allocation
  191. A non-virtual member function is defined in a base class and overridden in a derived class; if that function is called through a base-class pointer to a derived class object, the derived-class version is used.
    Topic: Polymorphism & Virtual Functions
    1. True
    2. False ✓ Correct answer
  192. 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 nonvirtual member function, ding(), then the statement p->ding(); will cause the version of ding() in the _____ class to be executed.
    Topic: Polymorphism & Virtual Functions
    1. Base ✓ Correct answer
    2. Derived
    3. Abstract
    4. virtual
  193. In which of the following OOP paradigm objects cannot exist independently?
    Topic: Polymorphism & Virtual Functions
    1. Aggregation
    2. Inheritance
    3. Composition
    4. Polymorphism ✓ Correct answer
  194. The keyword "friend" should be placed in ____________ :
    Topic: Operator Overloading & Friend Functions
    1. Main Function
    2. Function Definition
    3. Anywhere in program
    4. Function Declaration ✓ Correct answer
  195. Identify which of the following overloaded operator function’s declaration is appropriate for the given call? Rational_number_1 + 2.325 Where Rational_number_1 is an object of user defined class Rational_number.
    Topic: Operator Overloading & Friend Functions
    1. Rational_number operator+( Rational_number & obj);
    2. Rational_number operator+(double& obj); ✓ Correct answer
    3. Rational_number operator+(Rational_number &obj, double& num);
    4. operator+(double& obj);
  196. Which operator can not be overloaded?
    Topic: Operator Overloading & Friend Functions
    1. The relation operator ( >= )
    2. Assignment operator ( = )
    3. Script operator ( [] )
    4. Conditional operator (? : ) ✓ Correct answer
  197. Which of the following operators operate on one operand?
    Topic: Operator Overloading & Friend Functions
    1. Unary Operators ✓ Correct answer
    2. Ternary Operator
    3. Binary Operators
    4. All of the given options
  198. The >= operator can be overloaded.
    Topic: Operator Overloading & Friend Functions
    1. True ✓ Correct answer
    2. False
  199. ___________ Operator is used to create objects at run time.
    Topic: Operator Overloading & Friend Functions
    1. New ✓ Correct answer
    2. Create
    3. Dynamic
    4. Subscript
  200. Static Data Members can be accessed through _________.
    Topic: Operator Overloading & Friend Functions
    1. Semi colon
    2. Dot operator
    3. Scope resolution operator
    4. Dot operator and scope resolution operator ✓ Correct answer
  201. In expression b = c / d , the arity of division (/) operator is ________:
    Topic: Operator Overloading & Friend Functions
    1. 1
    2. 4
    3. 2 ✓ Correct answer
    4. 3
  202. In C++, which of the following is defined as stream insertion operator?
    Topic: Operator Overloading & Friend Functions
    1. *<
    2. << ✓ Correct answer
    3. *>
    4. >>
  203. Which of the following is an example of unary operator?
    Topic: Operator Overloading & Friend Functions
    1. Division Operator ( / )
    2. Equality Operator ( = =)
    3. Inequality Operator ( != )
    4. Increment Operator ( ++ ) ✓ Correct answer
  204. Which of the following issue(s) can be caused by the use of friend functions?
    Topic: Operator Overloading & Friend Functions
    1. All of the given ✓ Correct answer
    2. Tough debugging
    3. Data vulnerability
    4. Programming bugs
  205. cout is an object of _____ class.
    Topic: Operator Overloading & Friend Functions
    1. istream
    2. instream
    3. fstream
    4. ostream ✓ Correct answer
  206. Which of the following operator doesn't take any argument if overloaded?
    Topic: Operator Overloading & Friend Functions
    1. !
    2. -
    3. +
    4. None of the given choices ✓ Correct answer
  207. Statement "Yasir is a friend of Ali and Ali is a friend of Yasir" is an example of :
    Topic: Operator Overloading & Friend Functions
    1. One way association
    2. Two way association ✓ Correct answer
    3. Ternary association
    4. N-ary association
  208. We can allocate dynamic memory in C++ through __________ operator.
    Topic: Operator Overloading & Friend Functions
    1. Static
    2. Const
    3. New ✓ Correct answer
    4. Global
  209. Friend functions are _____________ functions of a class.
    Topic: Operator Overloading & Friend Functions
    1. None of given
    2. object member
    3. non-member ✓ Correct answer
    4. data member
  210. Suppose that the Test class does not have an overloaded assignment operator. What happens when an assignment a=b; is given for two Test objects a and b?
    Topic: Operator Overloading & Friend Functions
    1. The automatic assignment operator is used
    2. The copy constructor is used ✓ Correct answer
    3. Compiler error
    4. Run-time error
  211. The compiler won’t object if you overload the * operator to perform division.
    Topic: Operator Overloading & Friend Functions
    1. True ✓ Correct answer
    2. False
  212. Which construct is the source for the creation of an object at runtime?
    Topic: Operator Overloading & Friend Functions
    1. Destructor of the class
    2. New operator ✓ Correct answer
    3. Delete operator
    4. Constructor of the class
  213. Which of the following is defined as stream extraction operator in C++?
    Topic: Operator Overloading & Friend Functions
    1. *<
    2. <<
    3. *>
    4. >> ✓ Correct answer
  214. What is the purpose of new operator?
    Topic: Operator Overloading & Friend Functions
    1. Used as return type when an object is created
    2. Used to declare any new thing in a program
    3. Allocates memory for an object or array
    4. Allocates memory for an object or array and returns a particular pointer ✓ Correct answer
  215. Which of the following is correct feature that is used to make basic operators like +, -, * and / etc. to work with user defined types?
    Topic: Operator Overloading & Friend Functions
    1. type loading
    2. abstraction
    3. operator overloading ✓ Correct answer
    4. inheritance
  216. A Post-fix unary operator is implemented in C ++ using Member function with
    Topic: Operator Overloading & Friend Functions
    1. Non-member function, int
    2. 1 dummy int argument ✓ Correct answer
    3. Equality Operator: ==
    4. object member
  217. choose correct declaration of overload*=1 operator for class complex as Member function
    Topic: Operator Overloading & Friend Functions
    1. Stream Extraction Operator: >>
    2. Function Operator: ()
    3. Rational_number operator+( Rational_number & obj);
    4. Complex and operator*=(const complex & c) ✓ Correct answer
  218. choose the correct declaration of overloaded equality (==)operator for class string as a Member function
    Topic: Operator Overloading & Friend Functions
    1. Bool operator==(const string and s) ✓ Correct answer
    2. Function Operator: ()
    3. Complex operator + ::(const Complex & rhs);
    4. Rational_number operator+(double& obj);
  219. choose correct declaration of overloaded inequality(!=) operator for class string as non member friend function
    Topic: Operator Overloading & Friend Functions
    1. Rational_number operator+( Rational_number & obj);
    2. friend bool operator !=(const string &s1,const string &2) ✓ Correct answer
    3. Complex operator +(const Complex & rhs);
    4. Function Operator: ()
  220. choose the correct option to declare an overloaded Stream insertion operator for 0304-1659294 userdefind class "string" as a non- member friend function
    Topic: Operator Overloading & Friend Functions
    1. Complex and operator*=(const complex & c)
    2. friend ostream & operator<<(ostream and os,const string & s) ✓ Correct answer
    3. Stream Extraction Operator: >>
    4. operator + Complex (const Complex & rhs);
  221. a post-fix unary operator implemented in C plus plus using non Member function with---- arguments
    Topic: Operator Overloading & Friend Functions
    1. Dot operator
    2. two ✓ Correct answer
    3. Main Function
    4. Non-member function, char
  222. what is the output of the following code int main(){int cost x=10;cout<<++x;return0;}
    Topic: Operator Overloading & Friend Functions
    1. Member function, int
    2. Main Function
    3. error ✓ Correct answer
    4. Depends on code
  223. ----- define the order of evaluation of an operator is an expression
    Topic: Operator Overloading & Friend Functions
    1. operator precedence ✓ Correct answer
    2. Ternary Operator
    3. Equality Operator: ==
    4. operator overloading
  224. assignment operator are
    Topic: Operator Overloading & Friend Functions
    1. Right to Right
    2. right associative ✓ Correct answer
    3. Dot operator
    4. The automatic assignment operator is used
  225. ___________, which means if A declares B as its friend it does NOT mean that A can access private data of B. It only means that B can access all data of A.
    Topic: Operator Overloading & Friend Functions
    1. Friendship is one way only ✓ Correct answer
    2. Friendship is two way only
    3. NO Friendship between classes
    4. Any kind of friendship
  226. To convert from a user-defined class to a basic type, you would most likely use
    Topic: Operator Overloading & Friend Functions
    1. a built-in conversion operator.
    2. a one-argument constructor.
    3. an overloaded = operator.
    4. a conversion operator that’s a member of the class. ✓ Correct answer
  227. For classes with common behavior, you can save effort by placing the common behavior in a __________.
    Topic: Operator Overloading & Friend Functions
    1. Derived Class
    2. Base class ✓ Correct answer
    3. Deprived Class
    4. Named class
  228. An overloaded operator always requires one less argument than its number of operands.
    Topic: Operator Overloading & Friend Functions
    1. True ✓ Correct answer
    2. False
  229. Friend class and friend function can be used as an alternate to each other
    Topic: Operator Overloading & Friend Functions
    1. True ✓ Correct answer
    2. False
  230. Which of the following operators always takes no argument if overloaded?
    Topic: Operator Overloading & Friend Functions
    1. /
    2. -
    3. +
    4. ++ ✓ Correct answer
  231. Assume a class C with objects obj1, obj2, and obj3. For the statement obj3 = obj1 - obj2 to work correctly, if the overloaded - operator must
    Topic: Operator Overloading & Friend Functions
    1. take two arguments.
    2. return a value ✓ Correct answer
    3. create a named temporary object.
    4. take four arguments
  232. When the base class and the derived class have a member function with the same name, you must be more specific which function you want to call (using ___________).
    Topic: Operator Overloading & Friend Functions
    1. scope resolution operator
    2. dot operator
    3. null operator
    4. Operator overloading ✓ Correct answer
  233. Non Template Friend functions of a class are friends of ________instance/s of that class.
    Topic: Operator Overloading & Friend Functions
    1. All ✓ Correct answer
    2. One specific
    3. All instances of one date type
    4. None of the given options
  234. What is the general syntax of overloading Unary Operator as member function of the class?
    Topic: Operator Overloading & Friend Functions
    1. TYPE & operator OP (); ✓ Correct answer
    2. TYPE & operator OP (int);
    3. TYPE & operator OP (TYPE &);
    4. TYPE & operator OP (TYPE &, TYPE &);
  235. Which of the following function declaration is correct to overload the + operator as member function in Complex class?
    Topic: Operator Overloading & Friend Functions
    1. Complex +(const Complex & rhs);
    2. operator + Complex (const Complex & rhs);
    3. Complex operator +(const Complex & rhs); ✓ Correct answer
    4. Complex operator + ::(const Complex & rhs);
  236. Insertion operator is ________________ associative.
    Topic: Operator Overloading & Friend Functions
    1. Left to Left
    2. Right to Left
    3. Left to Right ✓ Correct answer
    4. Right to Right
  237. What will be the output of the following code? #include<iostream> using namespace std; int main() { int const x = 10;cout << ++x;}
    Topic: Operator Overloading & Friend Functions
    1. 10 ✓ Correct answer
    2. Run Time Error
    3. 11
    4. Compile time Error
  238. In C++, the subscript operator [] must be overloaded as a _______ of the class, with one parameter of _______ type.
    Topic: Operator Overloading & Friend Functions
    1. Member function, int ✓ Correct answer
    2. Member function, char
    3. Non-member function, int
    4. Non-member function, char
  239. In C++, which of the following operator can only be overloaded as a member function of the class?
    Topic: Operator Overloading & Friend Functions
    1. Equality Operator: ==
    2. Function Operator: ()
    3. Inequality Operator: !=
    4. Stream Extraction Operator: >> ✓ Correct answer
  240. Which of the following operator can be overloaded?
    Topic: Operator Overloading & Friend Functions
    1. +
    2. ++
    3. +=
    4. All of the above ✓ Correct answer
  241. __________ operator is used to access via the variable name?
    Topic: Operator Overloading & Friend Functions
    1. dot operator (.) ✓ Correct answer
    2. arrow operator (->)
    3. equal operator (=)
    4. All of the above
  242. An operator in C++ can be overloaded using __________ keyword.
    Topic: Operator Overloading & Friend Functions
    1. Switch
    2. Overload
    3. Load
    4. Operator ✓ Correct answer
  243. In C++, when a binary overloaded operator '+' is called, ______________ is passed as an argument.
    Topic: Operator Overloading & Friend Functions
    1. Left hand operand ✓ Correct answer
    2. Dot operator
    3. Right hand operand
    4. Pointer
  244. In C++, if new operator is used, when is the constructor called?
    Topic: Operator Overloading & Friend Functions
    1. Constructor is called to allocate memory
    2. After the allocation of memory ✓ Correct answer
    3. Before the allocation of memory
    4. Depends on code
  245. Suppose c1, c2, and c3 are the objects of the Complex class and we overloaded the + operator. c3 = c1 + c2; In this statement, ____________ object will be passed as argument when + operator is called.
    Topic: Operator Overloading & Friend Functions
    1. c2
    2. c3
    3. c1 and c2 ✓ Correct answer
    4. c1
  246. Which of the following is unary operator in C++?
    Topic: Operator Overloading & Friend Functions
    1. ++ ✓ Correct answer
    2. *
    3. -
    4. +
  247. What will be the output of following C++ code? int a=5; cout<<a++;
    Topic: Operator Overloading & Friend Functions
    1. 0
    2. 5 ✓ Correct answer
    3. a
    4. 6
  248. Which of the following concept is more close to encapsulation?
    Topic: Encapsulation, Abstraction & Access Control
    1. Inheritance
    2. Information Hiding ✓ Correct answer
    3. Exception Handling
    4. Polymorphism
  249. In classes which of the following is default access specifier?
    Topic: Encapsulation, Abstraction & Access Control
    1. None of the given option
    2. Private ✓ Correct answer
    3. Public
    4. Protected
  250. Which of the following is the default access specifier for members of a class?
    Topic: Encapsulation, Abstraction & Access Control
    1. private ✓ Correct answer
    2. protected and public
    3. public
    4. protected and private
  251. Main characteristic of information hiding is:
    Topic: Encapsulation, Abstraction & Access Control
    1. Unlimited access
    2. Limited access ✓ Correct answer
    3. Keep the model interesting
    4. Keep the model simple
  252. Which of the following is not an access specifier in C ++?
    Topic: Encapsulation, Abstraction & Access Control
    1. hidden ✓ Correct answer
    2. Global data member
    3. Limited access
    4. Private
  253. Which of the following concept deals with the security of data?
    Topic: Encapsulation, Abstraction & Access Control
    1. Data Hiding ✓ Correct answer
    2. Generalization
    3. Inheritance
    4. Polymorphism
  254. object hides its information from others this concept is known as
    Topic: Encapsulation, Abstraction & Access Control
    1. hidden
    2. information hiding ✓ Correct answer
    3. Limited access
    4. relevant information
  255. abstraction provides information according to
    Topic: Encapsulation, Abstraction & Access Control
    1. relevant information
    2. Information Hiding
    3. user perspective ✓ Correct answer
    4. encapsulation, abstraction
  256. which of the following is most suitable advantage of information hiding
    Topic: Encapsulation, Abstraction & Access Control
    1. simplifies the model ✓ Correct answer
    2. Exception Handling
    3. relevant information
    4. Keep the model interesting
  257. information hiding can be achieved through-------
    Topic: Encapsulation, Abstraction & Access Control
    1. Unlimited access
    2. Keep the model simple
    3. encapsulation, abstraction ✓ Correct answer
    4. relevant information
  258. ---- is used for hiding the details of an object from the other parts of a program
    Topic: Encapsulation, Abstraction & Access Control
    1. Information hiding
    2. 2 , 1
    3. Public
    4. encapsulation ✓ Correct answer
  259. abstraction includes-------
    Topic: Encapsulation, Abstraction & Access Control
    1. relevant information ✓ Correct answer
    2. Information hiding
    3. encapsulation, abstraction
    4. protected and private
  260. abstraction help to
    Topic: Encapsulation, Abstraction & Access Control
    1. reduce the complexity ✓ Correct answer
    2. Implementation independence
    3. Keep the model simple
    4. encapsulation, abstraction
  261. Using encapsulation we can achieve
    Topic: Encapsulation, Abstraction & Access Control
    1. Information hiding ✓ Correct answer
    2. Least interdependencies among modules
    3. Implementation independence
    4. All of given options
  262. We achieve independence of internal implementation from its external interface through-----------
    Topic: Encapsulation, Abstraction & Access Control
    1. Encapsulation
    2. Information Hiding
    3. Abstraction ✓ Correct answer
    4. both encapsulation and information hiding
  263. Keeping in view the principle of abstraction, which of the above information the company needs to save as employee's record?
    Topic: Encapsulation, Abstraction & Access Control
    1. 2 , 1
    2. 1, 3, 5
    3. 1, 2, 3 ✓ Correct answer
    4. All of the above
  264. Enclosing all the characteristics of an object within the object itself is described as __________.
    Topic: Encapsulation, Abstraction & Access Control
    1. Information hiding
    2. All of the above
    3. Static data member
    4. Encapsulation ✓ Correct answer
  265. The __________ tells the compiler what task the function will be performing.
    Topic: Mixed / Other Important MCQs
    1. Function declaration
    2. Function calling
    3. Function definition ✓ Correct answer
    4. None of the given
  266. Which of the following is the correct way of declaring a constant variable named RollNo?
    Topic: Mixed / Other Important MCQs
    1. const RollNo;
    2. int const rollNo;
    3. int RollNo const;
    4. const int RollNo; ✓ Correct answer
  267. Student *ptr = new Student("Ali"); is an example of ____________.
    Topic: Mixed / Other Important MCQs
    1. Destructor
    2. Constructor
    3. Dynamic memory allocation ✓ Correct answer
    4. Static memory allocation
  268. __________ provide the facility to access the data member.
    Topic: Mixed / Other Important MCQs
    1. accesser function ✓ Correct answer
    2. private function
    3. inline function
    4. None of the given
  269. Which one is not keyword in C++?
    Topic: Mixed / Other Important MCQs
    1. operator
    2. B_op ✓ Correct answer
    3. const
    4. None of given
  270. In expression c1*c2+c3-c4 which of the following will be executed in first order
    Topic: Mixed / Other Important MCQs
    1. takes iterators as its first two arguments.
    2. Global Variables
    3. Polymorphism
    4. C1*c2 ✓ Correct answer
  271. Which of the following statement(s) describe constant member functions?
    Topic: Mixed / Other Important MCQs
    1. Member functions can be made private
    2. non of the given
    3. initialize data member
    4. All of the given option ✓ Correct answer
  272. How many interactions are there in the following scenario Imran has the car. he drive the car and car has four wheels and doors
    Topic: Mixed / Other Important MCQs
    1. Data hiding
    2. composition
    3. Vehicle
    4. 3 ✓ Correct answer
  273. a child inherits characteristics from its----- --
    Topic: Mixed / Other Important MCQs
    1. Static
    2. private function
    3. Local Variables
    4. parent ✓ Correct answer
  274. member initializer list is used to
    Topic: Mixed / Other Important MCQs
    1. Data Hiding
    2. constant pointer to constant data
    3. initialize data members ✓ Correct answer
    4. static member
  275. Which of the following is true about accessor functions?
    Topic: Mixed / Other Important MCQs
    1. functions and classes
    2. Private members can be accessed using friend functions
    3. all of the given option ✓ Correct answer
    4. None of given
  276. suppose you have following C + + statement int old value=10; int new value=++old value; what will be the value of old value and newValue after executing above statements ?
    Topic: Mixed / Other Important MCQs
    1. The compiler can only generate copy for the int type data
    2. Two-way Association
    3. oldValue=11,newValue=11 ✓ Correct answer
    4. initialize data members
  277. which of the following is not true about constant number function
    Topic: Mixed / Other Important MCQs
    1. all of the given option ✓ Correct answer
    2. None of given
    3. Constant Variables
    4. Function declaration
  278. Which of the following are an advantage of OOP?
    Topic: Mixed / Other Important MCQs
    1. OOP makes it easy to re-use the code
    2. It provides an ability to create one user defined data type by extending the other
    3. It provides the facility of defining Abstract data types through which real world entities can be defined better.
    4. All of the given options ✓ Correct answer
  279. What is true about function templates?
    Topic: Mixed / Other Important MCQs
    1. The compiler generates only one copy of the function template
    2. The compiler generates a copy of function respective to each type of data ✓ Correct answer
    3. The compiler can only generate copy for the int type data
    4. None of the given.
  280. Which of the following is the best approach if it is required to have more than one functions having exactly same functionality and implemented on different data types?
    Topic: Mixed / Other Important MCQs
    1. Templates ✓ Correct answer
    2. Overloading
    3. Data hiding
    4. Encapsulation
  281. The find() algorithm
    Topic: Mixed / Other Important MCQs
    1. finds matching sequences of elements in two containers.
    2. finds a container that matches a specified container.
    3. takes iterators as its first two arguments. ✓ Correct answer
    4. takes container elements as its first two arguments.
  282. Which of the following option is false?
    Topic: Mixed / Other Important MCQs
    1. Public members are accessible from other classes also
    2. Private members can be accessed using friend functions
    3. Data members can't be inherited ✓ Correct answer
    4. Member functions can be made private
  283. #include<iostream>
    Topic: Mixed / Other Important MCQs
    1. 1 1 1
    2. 3 3 3
    3. 1 2 3 ✓ Correct answer
    4. 1 1 2
  284. Car carries passengers.
    Topic: Mixed / Other Important MCQs
    1. Public Transport
    2. Passenger Transport
    3. Vehicle ✓ Correct answer
    4. Navy Ships
  285. What is a class?
    Topic: OOP Concepts, Classes & Objects
    1. A class is a section of computer memory containing objects
    2. A class is a section of the hard disk reserved for object oriented programs
    3. A class is the part of an object that contains the variables.
    4. A class is a description of a kind of object ✓ Correct answer
  286. We capture the object attributes and behavior in Object Oriented programming using----- ----------
    Topic: OOP Concepts, Classes & Objects
    1. Class ✓ Correct answer
    2. Function
    3. Data Members
    4. Instances
  287. Graphical representation of the classes and objects is called object model it shows - ------
    Topic: OOP Concepts, Classes & Objects
    1. Class Name only
    2. Class Name and attributes
    3. Relationships of the objects and classes
    4. all of the given ✓ Correct answer
  288. When is a constructor called?
    Topic: OOP Concepts, Classes & Objects
    1. Each time the constructor identifier is used in a program statement
    2. During the instantiation of a new object ✓ Correct answer
    3. During the construction of a new class
    4. At the beginning of any program execution
  289. In c++ by default access of classes is .
    Topic: OOP Concepts, Classes & Objects
    1. Private ✓ Correct answer
    2. Protected
    3. Public
    4. None of the given
  290. Encapsulation means Select correct option:
    Topic: OOP Concepts, Classes & Objects
    1. Extending the behavior of class in another class
    2. Data and behavior are tightly coupled within an entity ✓ Correct answer
    3. One entity takes all the attributes and operations of the other
    4. Taking out the common features and put those in a separate class
  291. Which of the following is an advantage of OOP?
    Topic: OOP Concepts, Classes & Objects
    1. OOP makes it easy to re-use the code
    2. It provides an ability to create one user defined data type by extending the other
    3. It provides the facility of defining Abstract data types through which real world entities can be defined better
    4. All of the given options ✓ Correct answer
  292. Objects having identical characteristics belong to
    Topic: OOP Concepts, Classes & Objects
    1. Same class ✓ Correct answer
    2. Two different classes
    3. Any number of different classes
    4. Objects can not have identical characteristics
  293. At the most, how many instances of certain class can be created?
    Topic: OOP Concepts, Classes & Objects
    1. 1
    2. 6
    3. 3
    4. none of these ✓ Correct answer
  294. ________ is/are used to access information hidden within an object?
    Topic: OOP Concepts, Classes & Objects
    1. Interface ✓ Correct answer
    2. Private data members
    3. Private member functions
    4. Both public and private members
  295. A C++ class is similar to --------------------
    Topic: OOP Concepts, Classes & Objects
    1. Structure ✓ Correct answer
    2. Header File
    3. Library File
    4. None of the given
  296. Which of the following statements best describes a constructor?
    Topic: OOP Concepts, Classes & Objects
    1. It is used to initialize the data members of a class ✓ Correct answer
    2. It is used to destroy the objects of a class
    3. It allocates memory for static members only
    4. It is called only once in a program
  297. A class is a blueprint of ______.
    Topic: OOP Concepts, Classes & Objects
    1. Objects ✓ Correct answer
    2. Functions
    3. Data members
    4. Structures
  298. An object has ______ interface(s).
    Topic: OOP Concepts, Classes & Objects
    1. Exactly one
    2. One or more than one ✓ Correct answer
    3. Exactly two
    4. No
  299. Suppose Test is a class and void show() is its public member function. Which of the following is the correct call of show() using a Test pointer ptr?
    Topic: OOP Concepts, Classes & Objects
    1. ptr.show()
    2. ptr->show() ✓ Correct answer
    3. *ptr.show()
    4. Test->show()
  300. Which of the following features of OOP is used to deal with only relevant details?
    Topic: OOP Concepts, Classes & Objects
    1. Encapsulation
    2. Abstraction ✓ Correct answer
    3. Inheritance
    4. Polymorphism
  301. An object has attributes, operations and ______.
    Topic: OOP Concepts, Classes & Objects
    1. Unique identity ✓ Correct answer
    2. Static members
    3. Friend functions
    4. Constructors
  302. ______ is the set of functions of an object that are exposed to other objects.
    Topic: OOP Concepts, Classes & Objects
    1. Interface ✓ Correct answer
    2. Class
    3. Message
    4. State
  303. The return type of a constructor is of -------------
    Topic: Constructors, Destructors & Copy Control
    1. Integer
    2. Chracter
    3. Double
    4. No type ✓ Correct answer
  304. Default constructor is such constructor which either has no ---------or if it has some parameters these have -------- values
    Topic: Constructors, Destructors & Copy Control
    1. Parameter, temporary
    2. Null, Parameter
    3. Parameter, default ✓ Correct answer
    4. non of the given
  305. A copy constructor is invoked when
    Topic: Constructors, Destructors & Copy Control
    1. a function do not returns by value.
    2. an argument is passed by value. ✓ Correct answer
    3. a function returns by reference.
    4. an argument is passed by reference.
  306. By default, assignment operator (=) performs,
    Topic: Constructors, Destructors & Copy Control
    1. Shallow copy ✓ Correct answer
    2. Deep copy
    3. Both of these
    4. None of these
  307. Compiler can automatically generate the following constructor/s for a class,
    Topic: Constructors, Destructors & Copy Control
    1. Default constructor
    2. Copy constructor
    3. Both of these ✓ Correct answer
    4. None of these
  308. If we have not given any constructor for the class, compiler generates which of the following constructors?
    Topic: Constructors, Destructors & Copy Control
    1. Emplicit Default Constructor
    2. Implicit Default Constructor ✓ Correct answer
    3. Emplicit Parameterized Constructor
    4. Implicit Parameterized Constructor
  309. Suppose we have defined derived class copy constructor but have not defined base class copy constructor then compiler will,
    Topic: Constructors, Destructors & Copy Control
    1. Use base class default constructor
    2. Generate base class copy constructor itself ✓ Correct answer
    3. Use base class assignment operator
    4. None of these options is correct
  310. Compiler generated copy constructor performs
    Topic: Constructors, Destructors & Copy Control
    1. Shallow copy ✓ Correct answer
    2. Deep copy
    3. Both Shallow and Deep copy
    4. None of these options
  311. Suppose both derive and base classes have compilers generated copy constructors then derived class copy construct is
    Topic: Constructors, Destructors & Copy Control
    1. Compiler generated default constructor
    2. Compiler generated copy constructor ✓ Correct answer
    3. Both of these
    4. None of these
  312. In case of dynamic memory allocation in or class we should use
    Topic: Constructors, Destructors & Copy Control
    1. Default assignment operator
    2. User defined assignment operator ✓ Correct answer
    3. Default copy constructor
    4. None of these
  313. Consider the following two lines of code written for class student Student sobj1; Student sobj2(sobj1) In line 2 which constructor of student class will be called?
    Topic: Constructors, Destructors & Copy Control
    1. Default constructor of student class
    2. Copy constructor of student class ✓ Correct answer
    3. Both default and copy constructor of student class
    4. No constructor will be called
  314. C++ compiler does not allow to dynamically allocate memory for objects.
    Topic: Constructors, Destructors & Copy Control
    1. False ✓ Correct answer
    2. True
  315. What problem(s) may occur when we copy objects without using deep copy constructor?
    Topic: Constructors, Destructors & Copy Control
    1. Dangling pointer ✓ Correct answer
    2. Memory Leakage
    3. All of the given
    4. System crash
  316. Member initialization list is used to ______.
    Topic: Constructors, Destructors & Copy Control
    1. Declare data members
    2. Initialize data members ✓ Correct answer
    3. Define member functions
    4. Destroy objects
  317. Suppose a class does not have any constructor. What will happen when an object of this class is created?
    Topic: Constructors, Destructors & Copy Control
    1. Compiler will generate an error
    2. Compiler will call the implicit default constructor ✓ Correct answer
    3. Object will contain only static members
    4. Destructor will be called automatically
  318. A class can have only ______ destructor.
    Topic: Constructors, Destructors & Copy Control
    1. One ✓ Correct answer
    2. Two
    3. Three
    4. Unlimited
  319. In C++, which of the following keywords works only with constructors?
    Topic: Constructors, Destructors & Copy Control
    1. explicit ✓ Correct answer
    2. virtual
    3. friend
    4. static
  320. In case of multiple inheritance a derived class inherits,
    Topic: Access Specifiers & Inheritance
    1. Only the public member functions of its base classes
    2. Only the public data members of its base classes
    3. Both public data members and member functions of all its base classes ✓ Correct answer
    4. Data members and member functions of any two base classes
  321. In Private -------------- only member functions and friend classes or functions of a derived class can convert pointer or reference of derived object to that of parent object
    Topic: Access Specifiers & Inheritance
    1. specialization
    2. inheritance ✓ Correct answer
    3. abstraction
    4. composition
  322. Public methods of base class can --------- be accessed in its derived class
    Topic: Access Specifiers & Inheritance
    1. directly ✓ Correct answer
    2. inderectly
    3. simultaniously
    4. non of the given
  323. ------------- members are somewhere between public and private members. They are used in inheritance
    Topic: Access Specifiers & Inheritance
    1. protected ✓ Correct answer
    2. public
    3. private
    4. global
  324. Multiple inheritance can be of type
    Topic: Access Specifiers & Inheritance
    1. Public
    2. Private
    3. Protected
    4. All of the given ✓ Correct answer
  325. The default inheritance mode is,
    Topic: Access Specifiers & Inheritance
    1. Public inheritance
    2. Protected inheritance
    3. Private inheritance ✓ Correct answer
    4. None of the given
  326. In case of public inheritance, protected members of base class will be in derived class?
    Topic: Access Specifiers & Inheritance
    1. Private
    2. Public
    3. Protected ✓ Correct answer
    4. Hidden
  327. In protected inheritance the public members of base class become _ in derived class.
    Topic: Access Specifiers & Inheritance
    1. Public
    2. Private
    3. Protected ✓ Correct answer
    4. None of the given
  328. Which of the following is not type of inheritance in c++?
    Topic: Access Specifiers & Inheritance
    1. Public
    2. Protected
    3. Restricted ✓ Correct answer
    4. Private
  329. Which of the following type of inheritance is used to model "Implemented in terms of" relationship?
    Topic: Access Specifiers & Inheritance
    1. Public
    2. Private ✓ Correct answer
    3. Protected
    4. Confidential
  330. When we want to implement one class in terms of another class then we use,
    Topic: Access Specifiers & Inheritance
    1. Public inheritance
    2. Protected inheritance
    3. Private inheritance ✓ Correct answer
    4. None of these options
  331. Public inheritance represents;
    Topic: Access Specifiers & Inheritance
    1. "IS A "relationship ✓ Correct answer
    2. "Has A" relationship
    3. "IS Special kind of" relationship
    4. None of these option
  332. Child class can call constructor of its
    Topic: Access Specifiers & Inheritance
    1. Direct base class ✓ Correct answer
    2. Indirect base class
    3. Both direct and indirect base classes
    4. None of these
  333. We can have type of member functions in a class.
    Topic: Access Specifiers & Inheritance
    1. Public
    2. Private
    3. Protected
    4. All of these options ✓ Correct answer
  334. In specialization we can,
    Topic: Access Specifiers & Inheritance
    1. Replace child class with its base class
    2. Replace base class with its child class ✓ Correct answer
    3. Replace both child and base classes interchangeably
    4. None of the given option
  335. In private inheritance derived class pointer can be assigned to base class pointer in,
    Topic: Access Specifiers & Inheritance
    1. Main function
    2. In derived class member and friend class function ✓ Correct answer
    3. In base class member and friend functions
    4. None of the given option
  336. In case of private inheritance, private members of base class will be in derived class?
    Topic: Access Specifiers & Inheritance
    1. Private
    2. Public
    3. Protected
    4. Hidden ✓ Correct answer
  337. Which of the following access specifier ensure that base class member is accessible in derived class and Not outside of this class
    Topic: Access Specifiers & Inheritance
    1. Public
    2. Private
    3. Protected ✓ Correct answer
    4. All of above
  338. A child class can call constructor of the parent class through ______.
    Topic: Access Specifiers & Inheritance
    1. Its constructor initialization list ✓ Correct answer
    2. Its constructor body
    3. Both its constructor initialization list and body
    4. It cannot call the constructor of its parent class
  339. Consider the code below class class1{ Private: Void func1(); }; Class class2 : public class1{ }; Function func1 of class 1 is in class2.
    Topic: Access Specifiers & Inheritance
    1. Public
    2. Protected
    3. Private
    4. None of the given options ✓ Correct answer
  340. Generalization is a ______ approach.
    Topic: Access Specifiers & Inheritance
    1. Top-down
    2. Bottom-up ✓ Correct answer
    3. Side-by-side
    4. None of the given
  341. Which of the following is NOT an access specifier in C++?
    Topic: Access Specifiers & Inheritance
    1. Public
    2. Private
    3. Protected
    4. Hidden ✓ Correct answer
  342. In ______, a base class cannot always be replaced by its derived class.
    Topic: Access Specifiers & Inheritance
    1. Generalization
    2. Specialization ✓ Correct answer
    3. Inheritance
    4. Composition
  343. Which of the following is an advantage of inheritance?
    Topic: Access Specifiers & Inheritance
    1. Reusability ✓ Correct answer
    2. Encapsulation
    3. Data hiding
    4. Abstraction
  344. What is meant by multiple inheritance?
    Topic: Access Specifiers & Inheritance
    1. Deriving a derived class from more than one base class ✓ Correct answer
    2. Deriving many classes from a single base class
    3. Creating many objects of one class
    4. Inheriting only static members
  345. If class A inherits from class B, then class ______ contains all the characteristics of class ______.
    Topic: Access Specifiers & Inheritance
    1. A, B ✓ Correct answer
    2. B, A
    3. B, B
    4. A, A
  346. Minimum number of classes required for implementing multiple inheritance is ______.
    Topic: Access Specifiers & Inheritance
    1. 1
    2. 2
    3. 3 ✓ Correct answer
    4. 4
  347. Associativity can be changed in operator overloading.
    Topic: Operator Overloading
    1. True
    2. False ✓ Correct answer
  348. A normal C++ operator that acts in special ways on newly defined data types is said to be
    Topic: Operator Overloading
    1. glorified.
    2. encapsulated.
    3. classified.
    4. overloaded. ✓ Correct answer
  349. Suppose obj1 and obj2 are two objects of a user defined class A. An + operator is overloaded to add obj1 and obj2 using the function call obj1+obj2. Identify the correct function prototype against the given call?
    Topic: Operator Overloading
    1. A operator + ( A &obj); ✓ Correct answer
    2. int + operator();
    3. int operator (plus) ();
    4. A operator(A &obj3);
  350. In c++, compiler can generate which of the following operators 'code
    Topic: Operator Overloading
    1. ==
    2. = ✓ Correct answer
    3. &
  351. Which of the following operators cannot be overloaded?
    Topic: Operator Overloading
    1. Scope resolution operator ( :: ) ✓ Correct answer
    2. Insertion operator ( << )
    3. Extraction operator ( >> )
    4. The relation operator ( > )
  352. In operator overloading, which of the following operator takes one or no argument.
    Topic: Operator Overloading
    1. ++ ✓ Correct answer
    2. *
    3. %
    4. <<
  353. We can call base class assignment operator in derived class user defined assignment operator
    Topic: Operator Overloading
    1. Implicitly
    2. Explicitly ✓ Correct answer
    3. Using both of these options
    4. Using none of these options
  354. Which operator can not be overloaded?
    Topic: Operator Overloading
    1. The relation operator ( >= )
    2. Assignment operator ( = )
    3. Script operator ( [] )
    4. Conditional operator (? : ) ✓ Correct answer
  355. To convert from a user-defined class to a basic type, you would most likely use
    Topic: Operator Overloading
    1. a built-in conversion operator.
    2. a one-argument constructor.
    3. an overloaded = operator.
    4. a conversion operator that's a member of the class. ✓ Correct answer
  356. Assignment operators are ______ associative.
    Topic: Operator Overloading
    1. Left
    2. Right ✓ Correct answer
    3. Both left and right
    4. Non-associative
  357. A post-fix unary operator is implemented in C++ using a member function with ______.
    Topic: Operator Overloading
    1. No argument
    2. One dummy int argument ✓ Correct answer
    3. Two arguments
    4. A reference argument
  358. ______ defines the order of evaluation of an operator in an expression.
    Topic: Operator Overloading
    1. Operator associativity
    2. Operator precedence ✓ Correct answer
    3. Operator overloading
    4. Operator priority
  359. Suppose str1, str2 and str3 are objects of class String. Choose the appropriate declaration of the overloaded assignment operator for the statement str1 = str2 = str3 to work correctly.
    Topic: Operator Overloading
    1. void operator = (const String &);
    2. String & operator = (const String &); ✓ Correct answer
    3. String operator = (String);
    4. int operator = (const String &);
  360. class DocElement { public: virtual void Print() { cout << "Generic element"; } }; class Heading : public DocElement { public: void Print() { cout << "Heading element"; } }; class Paragraph : public DocElement { public: void Print() { cout << "Paragraph element"; } }; void main() { DocElement * p = new Paragraph(); p->Print(); } When you run this program, it will print out a single line to the console output. What will be in that line? Select one correct answer from the following list:
    Topic: Polymorphism, Virtual Functions & Abstract Classes
    1. Generic element
    2. Heading element
    3. Paragraph element ✓ Correct answer
    4. Nothing will be printed.
  361. When a virtual function is called by referencing a specific object by name and using the dot member selection operator (e.g., squareObject.draw()), the reference is resolved at compile time.
    Topic: Polymorphism, Virtual Functions & Abstract Classes
    1. True ✓ Correct answer
    2. False
  362. Compiler performs ________ type checking to diagnose type errors,
    Topic: Polymorphism, Virtual Functions & Abstract Classes
    1. Static ✓ Correct answer
    2. Dynamic
    3. Bound
    4. Unbound
  363. The type that is used to declare a reference or pointer is called its ---------
    Topic: Polymorphism, Virtual Functions & Abstract Classes
    1. default type
    2. static type ✓ Correct answer
    3. abstract type
    4. reference type
  364. It is sometimes useful to specify a class from which no objects will ever be created.
    Topic: Polymorphism, Virtual Functions & Abstract Classes
    1. True ✓ Correct answer
    2. False
  365. A pointer to a base class can point to objects of a derived class.
    Topic: Polymorphism, Virtual Functions & Abstract Classes
    1. True ✓ Correct answer
    2. False
  366. A function call is resolved at run-time in___________
    Topic: Polymorphism, Virtual Functions & Abstract Classes
    1. non-virtual member function.
    2. virtual member function. ✓ Correct answer
    3. Both non-virtual member and virtual member function.
    4. None of given
  367. The mechanism of selecting function at run time according to the nature of calling object is called,
    Topic: Polymorphism, Virtual Functions & Abstract Classes
    1. late binding ✓ Correct answer
    2. static binding
    3. virtual binding
    4. None of the given options
  368. An abstract class is useful when,
    Topic: Polymorphism, Virtual Functions & Abstract Classes
    1. We do not derive any class from it.
    2. There are multiple paths from one derived class to another.
    3. We do not want to instantiate its object. ✓ Correct answer
    4. You want to defer the declaration of the class.
  369. Function overriding is done in context of,
    Topic: Polymorphism, Virtual Functions & Abstract Classes
    1. Single class
    2. Single derived class
    3. Single base class
    4. Derived and base classes ✓ Correct answer
  370. To make a pure virtual, we need to give _after() of this function.
    Topic: Polymorphism, Virtual Functions & Abstract Classes
    1. =0; ✓ Correct answer
    2. =1;
    3. Null;
    4. None of the given
  371. Suppose person is a user defined class. In statement "Person*pPtr", static type of pPtr is ----.
    Topic: Polymorphism, Virtual Functions & Abstract Classes
    1. pPtr
    2. pointer
    3. person ✓ Correct answer
    4. None of the given
  372. Which statement is true for concrete class?
    Topic: Polymorphism, Virtual Functions & Abstract Classes
    1. It cannot be inherit from an abstract class
    2. It can be instantiated ✓ Correct answer
    3. It cannot be instantiated
    4. None of given
  373. Which of the following causes run time binding?
    Topic: Polymorphism, Virtual Functions & Abstract Classes
    1. Declaring object of abstract class
    2. Declaring pointer of abstract class ✓ Correct answer
    3. Declaring overridden methods as non-virtual
    4. None of the given
  374. In ______, a base class can be replace by its derived class,
    Topic: Polymorphism, Virtual Functions & Abstract Classes
    1. Sub-Typing ✓ Correct answer
    2. Super-Typing
    3. Multiple-Typing
    4. Restricted Typing
  375. ________ Binding means that target function for a call is selected at compile time.
    Topic: Polymorphism, Virtual Functions & Abstract Classes
    1. Static ✓ Correct answer
    2. Dynamic
    3. Automatic
    4. None of the given
  376. A pure virtual function is a virtual function that
    Topic: Polymorphism, Virtual Functions & Abstract Classes
    1. causes its class to be abstract. ✓ Correct answer
    2. returns nothing.
    3. is used in a derived class.
    4. takes no arguments.
  377. class A { public: virtual void MyVirtualMethod() = 0; }; class B : public A { public: void MyVirtualMethod() { //do something } }; Considering the given code, which of the following statements is correct?
    Topic: Polymorphism, Virtual Functions & Abstract Classes
    1. Class B is a an abstract class
    2. Class A is a concrete class
    3. Object of class A can not be instantiated ✓ Correct answer
    4. Class B is a child class of class A
  378. The keyword that is used that the variable can not change state?
    Topic: Static, Const & Friend Functions
    1. static
    2. const ✓ Correct answer
    3. friend
    4. private
  379. Friend's functions of class are _ members of that class.
    Topic: Static, Const & Friend Functions
    1. Public
    2. Private
    3. Protected
    4. None of the given ✓ Correct answer
  380. A static member function cannot be declared ______.
    Topic: Static, Const & Friend Functions
    1. Static
    2. Implicit
    3. Explicit
    4. Virtual ✓ Correct answer
  381. Friend functions are _____________ functions of a class.
    Topic: Static, Const & Friend Functions
    1. None of given
    2. object member
    3. non-member ✓ Correct answer
    4. data member
  382. If you do not initialize a static variable of int type, it is automatically initialized with ______.
    Topic: Static, Const & Friend Functions
    1. 1
    2. 0 ✓ Correct answer
    3. Garbage value
    4. Null
  383. ________ is represented by a line with an unfilled diamond head towards the container.
    Topic: Composition, Aggregation & Association
    1. Inheritance
    2. Association
    3. Aggregation ✓ Correct answer
    4. Composition
  384. Aggregation between objects shows that objects have ______ relationship.
    Topic: Composition, Aggregation & Association
    1. Strong
    2. Weak ✓ Correct answer
    3. No
    4. Permanent
  385. A book placed in a bookshelf is an example of ______.
    Topic: Composition, Aggregation & Association
    1. Composition
    2. Aggregation ✓ Correct answer
    3. Inheritance
    4. Association
  386. Composition is a ______ relationship, whereas aggregation is a ______ relationship.
    Topic: Composition, Aggregation & Association
    1. Weak, strong
    2. Strong, weak ✓ Correct answer
    3. Strong, permanent
    4. Temporary, weak
  387. A fan has wings. Which type of relationship exists between fan and wings?
    Topic: Composition, Aggregation & Association
    1. Association
    2. Aggregation
    3. Composition ✓ Correct answer
    4. Inheritance
  388. ______ associates the objects of exactly two classes.
    Topic: Composition, Aggregation & Association
    1. Binary association ✓ Correct answer
    2. Unary association
    3. N-ary association
    4. Aggregation
  389. The sub-object's life is not dependent on the life of the master class in ______.
    Topic: Composition, Aggregation & Association
    1. Composition
    2. Aggregation ✓ Correct answer
    3. Association
    4. Inheritance
  390. ______ is the weakest link between objects.
    Topic: Composition, Aggregation & Association
    1. Composition
    2. Aggregation
    3. Simple association ✓ Correct answer
    4. Inheritance
  391. Composition is a ______ relationship.
    Topic: Composition, Aggregation & Association
    1. Is-a
    2. Part-whole ✓ Correct answer
    3. Generalization
    4. Specialization
  392. The main function of scope resolution operator (::) is,
    Topic: Object-Oriented Modeling & Miscellaneous
    1. To define an object
    2. To define a data member
    3. To link the definition of an identifier to its declaration ✓ Correct answer
    4. All of the given
  393. Methodologies to the development of reusable software relate to .
    Topic: Object-Oriented Modeling & Miscellaneous
    1. Structure programming
    2. Procedural programming
    3. Generic programming ✓ Correct answer
    4. None of the given
  394. A class hierarchy
    Topic: Object-Oriented Modeling & Miscellaneous
    1. Shows the same relationships as a organization chart
    2. Describe "has a "relationship.
    3. Describe "is a kind of" relationship. ✓ Correct answer
    4. Shows the same relationships as a family tree.
  395. Which of the following is Not casting operator in c++ standard?
    Topic: Object-Oriented Modeling & Miscellaneous
    1. Static-cast
    2. Var-cast ✓ Correct answer
    3. Dynamic-cast
    4. Reinterpret-cast
  396. Which of the following is /are casting operator(s) inc++?
    Topic: Object-Oriented Modeling & Miscellaneous
    1. Static_cast
    2. Const_cast
    3. Dynamic_cast
    4. All of the given options ✓ Correct answer
  397. If we extend our model and the rest of the model is not affected, then it is called ______.
    Topic: Object-Oriented Modeling & Miscellaneous
    1. Flexibility ✓ Correct answer
    2. Coupling
    3. Encapsulation
    4. Polymorphism
  398. Defining a function inside the class body, the compiler treats that function as:
    Topic: Object-Oriented Modeling & Miscellaneous
    1. Virtual function
    2. Inline function ✓ Correct answer
    3. Friend function
    4. Static function
  399. When we define a function outside the class, we must use the keyword ______ to make the function inline.
    Topic: Object-Oriented Modeling & Miscellaneous
    1. virtual
    2. inline ✓ Correct answer
    3. static
    4. friend

MIHORA VU – Virtual University Assignment Solutions 2026, Solved Past Papers & All 455+ Courses

Official MIHORA TECH academic repository offering 28,328+ verified study documents for all 455+ Virtual University of Pakistan courses. Access VU Assignment Solution 2026 (Latest Session), Moaaz & Waqar Siddhu solved midterm & final papers, lecture handouts, and quizzes with 100% direct high-speed links.

SPRING 2026 / FALL 2026 ACTIVE SESSION

VU Assignment Solution 2026 (Latest Solved Assignments, GDBs & Quizzes)

Get high-scoring solutions for Assignment 1, Assignment 2, and Graded Discussion Boards across Computer Science, Mathematics, Management, English, and Economics. Compliant with Turnitin similarity limits (< 19%) and official 24-hour grace periods.

Open VU Assignment Solution 2026 Hub →

Popular Virtual University Courses (2026 Solved Papers & Solutions):

CS101 – Introduction to Computing CS201 – Introduction to Programming CS301 – Data Structures CS302 – Digital Logic Design CS401 – Computer Architecture & Assembly Language CS402 – Theory of Automata CS403 – Database Management Systems CS501 – Advance Computer Architecture CS502 – Fundamentals of Algorithms CS504 – Software Engineering - I CS506 – Enterprise Application Development CS601 – Data Communication CS602 – Computer Graphics CS604 – Operating Systems CS605 – Software Engineering - II CS607 – Artificial Intelligence CS610 – Computer Networks CS619 – Final Year Project MTH101 – Calculus & Analytical Geometry MTH202 – Discrete Mathematics MTH301 – Calculus II (Multivariable Calculus) MTH302 – Business Mathematics & Statistics MTH501 – Linear Algebra ENG101 – English Comprehension ENG201 – Business and Technical English Writing MGT101 – Financial Accounting MGT211 – Introduction to Business MGT301 – Principles of Marketing MGT501 – Human Resource Management ACC311 – Fundamentals of Auditing ACC501 – Business Finance STA301 – Statistics and Probability ECO401 – Economics (Micro & Macro) ISL202 – Islamic Studies / Ethics PAK301 – Pakistan Studies PHY101 – Physics - Mechanics & Waves

Complete Directory of All 455 Virtual University Courses & Codes

Browse the complete curriculum of all 455 accredited courses across 27 faculties of Virtual University of Pakistan. Every course includes verified lecture handouts, Moaaz & Waqar Siddhu solved papers, and 2026 assignment solution templates.

Accounting & Finance (16 Courses)

ACC301 – Financial Accounting ACC311 – Fundamentals of Auditing ACC501 – Business Finance BNK601 – Banking Laws & Practices BNK603 – Consumer Banking BNK604 – Commercial Banking BNK610 – Credit & Risk Management in Banking EFIN623 – Economics of Financial Markets FIN611 – Advanced Financial Accounting FIN621 – Financial Statement Analysis FIN622 – Corporate Finance FIN623 – Taxation Management FIN624 – Islamic Banking & Finance FIN625 – Credit & Risk Management FIN630 – Investment Analysis & Portfolio Management FIN722 – Advanced Corporate Finance

Bioinformatics (7 Courses)

BIF101 – Basic Bioinformatics BIF401 – Introduction to Bioinformatics BIF402 – Computational Biology Methods BIF501 – Genomics & Proteomics BIF601 – Bioinformatics Algorithms BIF602 – Structural Bioinformatics BIF604 – Systems Biology

Biological Sciences (16 Courses)

BIO101 – Basic Biology BIO102 – Introductory Biology & Diversity BIO201 – Cell Biology BIO202 – Biochemistry BIO203 – General Genetics BIO204 – Biochemical Techniques BIO301 – Molecular Biology BIO302 – Animal Physiology BIO303 – Developmental Biology BIO401 – Ecology & Evolutionary Biology BIO502 – Immunology & Pathology BIO503 – Pharmacology & Toxicology BIO504 – Applied Microbiology BIO505 – Environmental Biotechnology BIO506 – Forensic Biology BIO731 – Advanced Molecular Genetics

Virtual University of Pakistan (43 Courses)

BNK611 – Economic Ideology in Islam BT613T – Agricultural Biotechnology CS306 – Introduction to Python CS441 – Big Data Concepts CS442 – Introduction to Data Science CS620 – Modeling & Simulation CS701 – Theory of Computation CS703 – Operating Systems CS704 – Advanced Computer Architecture ECO302 – Microeconomics EDU407 – EDU407 ENG401 – Introduction to Literature: Short Story and Poetry GSC201 – Teaching of General Science MCM516 – TV News Reporting and Production MGMT611 – Human Relations MGMT629 – Crisis Management MGT201 – Financial Management MGT401 – Financial Accounting II MGT404 – MGT404 MGT504 – Organization Theory & Design MGT520 – International Business MGT522 – MGT522 MGT601 – SME Management MGT603 – Strategic Management MGT613 – Production and Operations Management MGT703 – Strategic Management MGT705 – Advanced Cost and Management Accounting MGT713 – Production / Operations Management MTH102 – Basic Algebra and Trigonometry MTH201 – Multivariable Calculus MTH304 – Mechanics MTH403 – MTH403 MTH404 – MTH404 MTH405 – MTH405 MTH621 – Real Analysis I MTH633 – Group Theory MTH642 – Fluid Mechanics MTH643 – MTH643 PAK303 – PAK303 PSC401 – Public International Law PSY409 – Positive Psychology SE601 – Software Construction & Development SE602 – Software Re—engineering

Bio-Technology (34 Courses)

BT101 – Ecology, Biodiversity & Evolution BT102 – Microbiology BT201 – Biotechnology Fundamentals BT301 – Recombinant DNA Technology BT302 – Cell and Tissue Culture BT401 – Genetic Engineering BT402 – Fermentation Technology BT403 – Agricultural Biotechnology BT404 – Medical Biotechnology BT405 – Industrial Biotechnology BT406 – Nanobiotechnology BT501 – Biochemical Engineering BT502 – Biosafety & Bioethics BT503 – Molecular Diagnostics BT504 – Stem Cell Technology BT505 – Food Biotechnology BT511 – Vaccine Technology BT512 – Drug Design & Development BT513 – Genomics & Functional Proteomics BT514 – Enzyme Technology BT601 – Advanced Genetic Engineering BT602 – Bioinformatics in Biotechnology BT603 – Bioprocess Engineering BT604 – Aquatic Biotechnology BT605 – Environmental Bioremediation BT611 – Synthetic Biology BT612 – Metabolic Engineering BT613 – Biofuels and Bioenergy BT614 – Clinical Research in Biotechnology BT693 – Research Project in Biotechnology BT732 – Advanced Molecular Biology Seminar BT734 – Advanced Cellular Biotechnology BT735 – Current Topics in Biotechnology NTBT301 – Nanotechnology in Biotechnology

Chemistry (2 Courses)

CHE201 – General Chemistry CHE301 – Organic Chemistry

Computer Science (55 Courses)

CS000 – Introduction to Computer Fundamentals CS001 – Computer Proficiency License CS101 – Introduction to Computing CS201 – Introduction to Programming CS202 – Web Design & Development CS204 – Cyber Law & Intellectual Property CS205 – Information Security Management CS206 – Ethical Hacking & Defense CS301 – Data Structures CS302 – Digital Logic Design CS304 – Object Oriented Programming CS310 – Introduction to Programming (Python) CS311 – Introduction to Web Services Development CS312 – Mobile Application Development CS314 – Embedded Systems & IoT CS315 – Web Engineering CS401 – Computer Architecture & Assembly Language CS402 – Theory of Automata CS403 – Database Management Systems CS405 – Mobile Computing CS407 – Cloud Computing Fundamentals CS408 – Human Computer Interaction CS409 – Ethical & Legal Issues in Computing CS410 – Design & Analysis of Algorithms CS411 – Visual Programming CS420 – Game Design and Development CS432 – Network Security CS435 – Cloud Computing Infrastructure CS501 – Advance Computer Architecture CS502 – Fundamentals of Algorithms CS505 – Agile Software Development CS506 – Enterprise Application Development CS507 – Information Systems CS508 – Modern Programming Languages CS510 – Compiler Construction CS511 – Distributed Systems CS521 – Data Science Principles CS601 – Data Communication CS602 – Computer Graphics CS603 – Software Architecture CS604 – Operating Systems CS606 – Compiler Design & Construction CS607 – Artificial Intelligence CS608 – Digital Signal Processing CS609 – System Programming CS610 – Computer Networks CS614 – Data Warehousing CS619 – Final Year Project CS621 – Information Retrieval Techniques CS625 – Formal Methods in Software Engineering CS627 – Computer Vision & Pattern Recognition CS636 – Big Data Analytics CS708 – Advanced Computer Graphics CS713 – Advanced Software Architecture CS718 – Advanced Artificial Intelligence

Software Engineering (4 Courses)

CS504 – Software Engineering - I CS605 – Software Engineering - II CS611 – Software Quality Assurance CS615 – Software Project Management

Statistics (18 Courses)

DSTA630 – Data Science Research Methods STA000 – Basic Statistics Fundamentals STA100 – Foundations of Statistics STA301 – Statistics and Probability STA304 – Statistical Inference STA404 – Experimental Design STA406 – Sampling Techniques STA408 – Biostatistics and Epidemiology STA630 – Research Methods in Social Sciences STA631 – Advanced Statistical Methods STA632 – Multivariate Analysis STA641 – Non-Parametric Methods STA642 – Econometric Models STA730 – Advanced Research Methodology in Statistics STAT100 – Statistics Fundamentals STAT404 – Applied Statistical Modeling STAT408 – Statistical Computing STAT730 – Advanced Biostatistics

Education (44 Courses)

ECE101 – Introduction to Early Childhood Care & Education EDU101 – Foundations of Education EDU201 – Learning Theories & Applications EDU205 – Classroom Management EDU301 – General Methods of Teaching EDU302 – Human Development & Learning EDU303 – School, Community and Teacher EDU304 – Educational Assessment & Evaluation EDU305 – Curriculum Development & Instruction EDU306 – Contemporary Trends in Education EDU401 – Critical Thinking and Reflective Practices EDU402 – Educational Leadership & Management EDU403 – Art, Craft & Calligraphy in Education EDU404 – Teaching of English EDU405 – Teaching of Mathematics EDU406 – Teaching of General Science EDU410 – ICT in Education EDU411 – Teaching of Social Studies EDU430 – Information & Communication Technology in Teaching EDU431 – Test Development & Measurement EDU433 – Educational Statistics EDU501 – Educational Psychology EDU505 – Guidance and Counseling in Schools EDU510 – Qualitative Research in Education EDU512 – Comparative Education EDU514 – Special Education Principles EDU515 – Early Childhood Education Curriculum EDU516 – Educational Technology & Media EDU601 – Philosophy of Education EDU602 – Educational Planning and Policy EDU604 – Educational Administration & Supervision EDU630 – Research Methods in Education EDU654 – Teacher Education in Pakistan EDU702 – Advanced Seminar in Educational Leadership EDU705 – Advanced Educational Policy Analysis EDUA305 – Applied Curriculum Development EDUA403 – Elementary Arts Education EDUA405 – Pedagogy of Mathematics EDUA516 – Educational Media Design EDUA630 – Action Research in Educational Settings MEDU402 – Master Level Educational Leadership MEDU406 – Science Teaching Pedagogies MEDU430 – Advanced ICT in Education MEDU601 – Advanced Philosophy of Education

Economics (11 Courses)

ECO401 – Economics (Micro & Macro) ECO402 – Microeconomics Analysis ECO403 – Macroeconomics Analysis ECO404 – Managerial Economics ECO406 – Development Economics ECO501 – Monetary Economics ECO601 – International Economics ECO603 – Public Sector Economics ECO606 – Agricultural Economics ECO607 – Environmental & Resource Economics ECO610 – Econometrics Principles

Management Sciences (26 Courses)

EMG525 – Engineering Project Management MGMT614 – Leadership & Team Building MGMT615 – Project Management Practices MGMT617 – Project Management Methodologies MGMT622 – Operations Management MGMT623 – Supply Chain Management MGMT625 – Knowledge Management Systems MGMT627 – Global Business Strategy MGMT628 – Strategic Management MGMT630 – Business Strategy & Policy MGMT631 – Innovation Management MGT101 – Financial Accounting MGT111 – Introduction to Public Administration MGT211 – Introduction to Business MGT301 – Principles of Marketing MGT402 – Cost & Management Accounting MGT411 – Money & Banking MGT501 – Human Resource Management MGT502 – Organizational Behaviour MGT503 – Principles of Management MGT510 – Total Quality Management MGT602 – Entrepreneurship MGT604 – Management of Financial Institutions MGT610 – Business Ethics & Corporate Governance MGT611 – Business & Labor Law MGTE630 – Business Management Strategy

English (34 Courses)

ENG001 – Basic English Grammar & Composition ENG101 – English Comprehension ENG201 – Business and Technical English Writing ENG301 – Business Communication ENG501 – History of English Language ENG502 – Introduction to Linguistics ENG503 – English Morphology and Syntax ENG504 – Sociolinguistics ENG505 – Phonetics & Phonology ENG506 – World Englishes ENG507 – Psycholinguistics ENG508 – Semantics & Pragmatics ENG509 – English for Specific Purposes (ESP) ENG510 – Language Testing & Evaluation ENG511 – Syllabus Design & Materials Development ENG512 – Stylistics & Literary Analysis ENG513 – Second Language Acquisition (SLA) ENG514 – Classical Poetry ENG515 – Classical Drama ENG516 – Research Methodology in Linguistics ENG517 – Modern Poetry ENG518 – Modern Drama ENG519 – Classical Novel ENG520 – Modern Novel ENG521 – American Literature ENG522 – Postcolonial Literature ENG523 – Continental Literature & Criticism ENG524 – Literary Criticism & Theory ENG525 – Discourse Analysis ENG526 – Applied Linguistics in Education ENG527 – Creative Writing & Composition ENG528 – Corpus Linguistics ENG529 – Translation Studies & Theory FENG301 – Functional English for Professionals

Islamic Studies (4 Courses)

ETH100 – Ethics (For Non-Muslim Students) ETH201 – Ethics & Moral Philosophy (For Non-Muslims) ISL201 – Islamic Studies ISL202 – Islamic Studies / Ethics

General Guides (1 Courses)

GENERAL – General University Resources, Guides & Handbooks

General Sciences (1 Courses)

GSC101 – General Science

Human Resources (4 Courses)

HRM613 – Human Resource Development HRM617 – Compensation & Benefits Management HRM624 – Conflict & Negotiation Management HRM627 – Strategic Human Resource Management

Information Technology (4 Courses)

IT430 – E-Commerce & Digital Business IT601 – Network Administration IT602 – Database Administration ITU430 – E-Commerce Systems

Microbiology (4 Courses)

MB501 – General Microbiology & Microbial Diversity MB502 – Microbial Physiology & Metabolism MB504 – Medical Microbiology MIC501 – Applied Microbiology

Mass Communication (22 Courses)

MCD401 – Media Content Development MCD403 – Media Ethics & Professional Standards MCM000 – Introduction to Communication Fundamentals MCM101 – Introduction to Mass Communication MCM301 – Communication Skills MCM304 – Mass Media in Pakistan MCM310 – Radio Broadcasting & Audio Media MCM311 – Radio & Television Production MCM401 – Fundamentals of Public Relations MCM404 – Electronic Media Content Creation MCM411 – News Writing and Reporting MCM431 – Digital Media & Online Journalism MCM501 – Development Support Communication MCM511 – Media Ethics, Cyber Laws & Regulation MCM514 – Feature, Column & Editorial Writing MCM517 – Advertising Strategy & Campaigns MCM520 – Print Media Design & Layout MCM531 – International & Cross-Cultural Communication MCM601 – Theories of Mass Communication MCM604 – Communication Research Methodology MCM610 – Cyber Journalism & Web Publishing MCMP310 – Radio & Audio Production Practical

Marketing (5 Courses)

MKT501 – Marketing Management MKT530 – Consumer Behaviour MKT610 – Customer Relationship Management (CRM) MKT621 – Advertising & Brand Management MKT630 – International Marketing Strategy

Mathematics (20 Courses)

MTH001 – Elementary Mathematics MTH100 – General Mathematics MTH101 – Calculus & Analytical Geometry MTH104 – Sets & Logic MTH202 – Discrete Mathematics MTH301 – Calculus II (Multivariable Calculus) MTH302 – Business Mathematics & Statistics MTH401 – Differential Equations MTH501 – Linear Algebra MTH601 – Operations Research MTH603 – Numerical Analysis MTH622 – Vector & Tensor Analysis MTH631 – Real Analysis MTH632 – Complex Analysis MTH634 – Topology MTH641 – Functional Analysis MTH644 – Mathematical Methods MTH645 – Mechanics MTH646 – Differential Geometry MTH647 – Fluid Mechanics

Social Studies (3 Courses)

PAK301 – Pakistan Studies PAK302 – History of Pakistan PAK522 – Ideology & Constitution of Pakistan

Physics (3 Courses)

PHY000 – Foundational Physics PHY101 – Physics - Mechanics & Waves PHY301 – Circuit Theory

Psychology (23 Courses)

PSY101 – General Psychology PSY401 – Clinical Psychology Fundamentals PSY402 – Social Psychology PSY403 – Developmental Psychology PSY404 – Abnormal Psychology PSY405 – Personality Theories & Assessment PSY406 – Educational Psychology Applications PSY407 – Experimental Psychology & Lab Methods PSY408 – Health Psychology PSY502 – History and Systems of Psychology PSY504 – Cognitive Psychology PSY505 – Psychological Testing & Measurement PSY510 – Positive Psychology & Well-being PSY511 – Counseling Psychology Principles PSY512 – Organizational & Industrial Psychology PSY513 – Neuropsychology Fundamentals PSY515 – Forensic & Criminal Psychology PSY516 – Cross-Cultural Psychology PSY610 – Neurological Basis of Behavior PSY611 – Psychopathology & Diagnostics PSY631 – Psychological Assessment Practicum PSY632 – Research Methods in Psychology PSYP631 – Psychological Assessment Lab Practical

Sociology (14 Courses)

SOC101 – Introduction to Sociology SOC201 – Pakistani Society and Culture SOC301 – Social Psychology & Society SOC302 – Cultural Anthropology SOC401 – Social Research Methods SOC402 – Classical Sociological Theories SOC403 – Social Change & Modernization SOC404 – Urban Sociology SOC601 – Rural Sociology & Community Development SOC602 – Gender Studies & Society SOC605 – Criminology & Juvenile Delinquency SOC608 – Sociology of Development SOC609 – Sociology of Health & Medicine SOC610 – Demography & Population Dynamics

Urdu Literature (2 Courses)

URD101 – Functional Urdu (Urdu Zaban-o-Adab) URDU101 – Urdu Language & Literature

Zoology (35 Courses)

ZOO101 – Principles of Animal Life I ZOO102 – Principles of Animal Life II ZOO103 – Animal Diversity: Invertebrates ZOO111 – Fundamentals of Zoology ZOO201 – Animal Diversity: Chordates ZOO202 – Animal Form & Function I ZOO203 – Animal Form & Function II ZOO301 – Animal Physiology ZOO302 – Cell & Molecular Biology in Zoology ZOO307 – Principles of Ecology ZOO401 – Evolution & Principles of Systematics ZOO403 – Animal Behavior & Sociobiology ZOO404 – Biostatistics for Zoologists ZOO405 – General Developmental Biology ZOO501 – Developmental Biology ZOO502 – Environmental Biology ZOO503 – Biostatistics in Zoological Research ZOO504 – Zoogeography & Paleontology ZOO505 – Wildlife of Pakistan & Conservation ZOO506 – Endocrinology ZOO507 – Animal Diversity & Behavior ZOO509 – Fish Biology & Fisheries Science ZOO510 – General Microbiology & Immunology ZOO511 – Immunology & Serology ZOO512 – Parasitology & Vectors ZOO513 – Applied Entomology ZOO514 – Biochemistry of Animals ZOO515 – Genetics & Population Biology ZOO516 – Aquaculture & Fisheries Management ZOO517 – Toxicology & Environmental Health ZOO518 – Comparative Vertebrate Anatomy ZOO519 – Mammalogy ZOO520 – Ornithology (Bird Biology) ZOO603 – Applied Parasitology & Vector Biology ZOO630 – Research Methodology in Zoology

Core Student Calculators & Rules Handbooks

Frequently Asked Questions – MIHORA VU Study Library

Where can I download VU Assignment Solution 2026 for CS101, CS201, MTH101, and all subjects?

MIHORA VU (https://study.mihora.tech/vu-assignment-solution-2026) offers verified 2026 assignment solutions, GDB answers, quiz files, and Dev-C++ code templates for all 455 Virtual University courses with 100% free direct downloads.

What is the 24-hour assignment grace period in Virtual University?

Virtual University gives students an automatic 24-hour grace period after the official assignment deadline. Submissions during this grace window are awarded full credit with 0 marks deduction.

How to avoid zero marks in VU assignments due to Turnitin plagiarism?

Never copy-paste solutions directly from YouTube or public groups. Keep Turnitin similarity under 19% by renaming code variables, rearranging logical statements, and writing custom explanations.

Where can I get Moaaz and Waqar Siddhu solved midterm and final past papers?

MIHORA VU hosts over 28,328 verified documents including complete Moaaz and Waqar Siddhu past paper collections for all 455 VU subjects, available via direct download without registration.

What is the 20% Two-Half passing rule in Virtual University?

Students must score at least 20% in the First Half (Quizzes, Assignments, GDBs, and Midterms) AND independently at least 20% in the Final Term exam paper to pass any course.