Latest Activity In Study Groups

Join Your Study Groups

VU Past Papers, MCQs and More

We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.

  1. Which is best approach to implement generic algorithm with minimum no of coding lines.

a)      Template

b)      Overloading

c)      Overriding

d)      Friend function/class

  1. Identify the correct way of declaring an object of user defined template class.
  2. In order to define a class template, the first line must be
  3. In case of multiple inheritance a derived class inherits
  4. A static member cannot be declared

a)      Static

b)      Implicit

c)      Explicit

d)      Virtual

  1. The operation of the assignment operator and of the copy constructor are

a)      Similar, except copy constructor  create a new object

b)      Similar, except assignment operator copies member data

c)      Different, except that they both create a new object

d)      Different, except that they do not copy member data

  1. A private data member or variable is not accessible to___________

a)      Base class

b)      Derived class

c)      Abstract class

d)      Virtual class

  1. When a class is derived from a class with a pure virtual function and no definition is supplied for that pure virtual function in the derived class, that derived class is also

a)      An abstract class

b)      A static class

c)      A concrete class

d)      A base class

  1. An object has _____________ interface

a)      One only

b)      Two only

c)      One or more than one

d)      No

  1. Encapsulation is a feature of object oriented programing which means

a)      Keep data separated from code

b)      Keep code and data in single place

c)      Keep data separated from code and also keep data and code in single place

d)      Reusing code by creating new classes from previously created class

  1. Consider “keyboard has keys” ……………………moaaz file mcq
  2. A friend function can access a class’s private data without being___________

a)      Static member of the class

b)      Non-member of the class

c)      Member of the class

d)      Constant member of the class

  1. Object communicate each other through______

a)       Messages

b)      Data member

c)      Member functions

d)      Pointer

  1. In order to free memory occupied by object, we use____________
  2. The type that is used to declare a reference or pointer is called its__________
  3. The operation of copy constructor must define by_____________

a)      System

b)      User

c)      System and user

d)      Administrator

  1. A base class member or method that is alternatively defined in derived class is known as_____

a)      Overwriting

b)      Overriding

c)      Overloaded

d)      Copy riding

  1. If a class D………………... moaaz file mcq
  2. Which relate to polymorphism………………….moaaz file mcq
  3. Multiple inheritance cab be of type

a)      Public

b)      Protected

c)      Private

d)      Private, public, protected

  1. The following function template return the maximum of ___________ values

Template<typename T>

Inline T const & max (T const & a, T cont & b)


// if a<b ? b:a;


a)      1

b)      2

c)      3

d)      4

  1. Consider the following statement

Int i Array[5];

Int *p Arr = iArray;

a)      Error in first statement

b)      Error in second statement

c)      Both statement have error

d)      No error in both statement

  1. _____________means that both the data and the methods which may access it are defined together in the same unit.

a)      Data hiding

b)      Data binding

  1. A static member function cannot have access to the ___________ pointer of class

a)      Daggling

b)      This

c)      Reference

d)      Null

  1. We can get only one unique value which can be used by all the object of the class by the assignment of_______

a)      Static

b)      Dynamic

c)      Data member

  1. Template provide convenient way to make a family of

a)      Function and class

b)      Variable and data member

c)      Class and exception

d)      Program and algorithm

  1. The specialization pattern <T*>  after the name says that this specialization is to be used for every

a)      Data type

b)      Meta type

c)      Virtual type

d)      Pointer type

Views: 160

Replies to This Discussion



thanks alot

We can get only one unique value which can be used by all the object of the class by the assignment of
is may answer static hai


© 2021   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service