VU CS-304 Online Test Preparation

MCQ's Test For CS-304 Final Term Exams Preparation Virtual University

Try The MCQ's Test For CS-304 Final Term Exams Preparation Virtual University

  • Total Questions10

  • Time Allowed10

CS-304 Final Term Exams Preparation Virtual University

00:00
Question # 1

Classes like TwoDimensionalShape and ThreeDimensionalShape would normally be concrete, while classes like Sphere and Cube would normally be abstract.

Question # 2

Considering the resolution order in which Considering the resolution order in which compiler search for functions in a program; the first priority is given to; the first priority is given to,

Question # 3

A copy constructor is invoked when

Question # 4

The members of a class that can be accessed without creating the object of the class is called

Question # 5

Suppose you create an uninitialized vector as follows:
vector evec; After adding the statment, evec.push_back(21); what will happen?

Question # 6

Destructor can be overloaded

Question # 7

Classes like TwoDimensionalShape and ThreeDimensionalShape would normally be concrete, while classes like Sphere and Cube would normally be abstract.

Question # 8

______ is a relationship

Question # 9

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?

Question # 10

Graphical representation of the classes and objects is called object model it shows -------

Prepare Complete Set Wise CS-304 Final Term Exams Preparation Virtual University MCQs Online With Answers


Topic Test

00:00

Top Scorers Of CS-304 Final Term Exams Preparation Virtual University MCQ`s Test

  • T
    Tahira Nawaz 17 - Aug - 2023 00 Min 01 Sec 10/10
  • U
    Uzair sajid 15 - Feb - 2024 01 Min 01 Sec 10/10
  • H
    Hamna mushtaq 24 - Feb - 2024 01 Min 02 Sec 10/10
  • H
    Humza munawar 23 - Feb - 2024 01 Min 13 Sec 10/10
  • T
    Tayyab Malik 22 - Jul - 2024 01 Min 51 Sec 10/10
  • D
    Daniyal Tahir 12 - Feb - 2024 01 Min 59 Sec 10/10
  • H
    Humna Nawaz 30 - May - 2024 02 Min 49 Sec 10/10
  • U
    Unknown 17 - Aug - 2023 05 Min 03 Sec 10/10
  • B
    bc200404586 AYESHA WARIS 15 - Feb - 2024 00 Min 54 Sec 9/10
  • S
    Saima Riaz 13 - Feb - 2024 01 Min 13 Sec 9/10
  • I
    Iqra Ishtiaq 22 - Aug - 2023 01 Min 17 Sec 9/10
  • R
    Rimsha Raja 02 - Jun - 2024 01 Min 26 Sec 9/10
  • K
    khalid Bhatti 12 - Feb - 2024 01 Min 42 Sec 9/10
  • A
    Abroo -e- zainab 24 - Feb - 2024 01 Min 51 Sec 9/10
  • R
    Rabiya Masood 26 - Aug - 2023 01 Min 56 Sec 9/10

Virtual University CS-304 Chapter 1 Important MCQ's

Sr.# Question Answer
1 Virtual functions allow you to
A. create an array of type pointer-to-base class that can hold pointers to derived classes.
B. create functions that can never be accessed.
C. group objects of different classes so they can all be accessed by the same function code
D. use the same function call to execute member functions of objects from different classes (Object-Oriented Programming in C++)
2 Algorithms can only be implemented using STL containers.
A. True
B. False
C. Not Sure
3 Consider the following statement Cupboard has books What is the relationship between Cupboard and books?
A. Composition
B. Aggregation
C. Inheritance
D. None of the given options
4 In case of multiple inheritance a derived class inherits,
A. Only the public member functions of its base classes
B. Only the public data members of its base classes
C. Both public data members and member functions of all its base classes
D. Data members and member functions of any two base classes
5 A copy constructor is invoked when
A. a function do not returns by value
B. an argument is passed by value
C. a function returns by reference.
D. an argument is passed by reference.
6 An abstract class is useful when,
A. We do not derive any class from it.
B. There are multiple paths from one derived class to another
C. We do not want to instantiate its object.
D. You want to defer the declaration of the class
7 A generalization-specialization relation between classes are implemented using
A. data hiding
B. friend classes
C. encapsulation
D. inheritance
8 In case of multiple inheritance a derived class inherits,
A. Only the public member functions of its base classes
B. Only the public data members of its base classes
C. Both public data members and member functions of all its base classes
D. Data members and member functions of any two base classes
9 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 ___________).
A. scope resolution operator
B. dot operator
C. null operator
D. Operator overloading
10 Friend functions are _____________ functions of a class.
A. None of given
B. object member
C. non-member
D. data member

Test Questions

Share your comments & questions here

Guest
  • No comments yet. Be the first to comment!