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

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

Question # 2

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?

Question # 3

Which part of an object exhibits its state?

Question # 4

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?

Question # 5

The sub-object’s life is not dependant on the life of master class in __________.

Question # 6

A template argument is preceded by the keyword ________.

Question # 7

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 # 8

Suppose we have two derived classes from a single class, can we write a method with same name in both these derived classes? Choose the best option.

Question # 9

Inheritance is a way to

Question # 10

Two important STL associative containers are _______ and _______.

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 Suppose we have two derived classes from a single class, can we write a method with same name in both these derived classes? Choose the best option.
A. No
B. Only if the two classes have the same name
C. Only if the main program does not declare both kinds
D. Yes
2 _______ “is a” relationship
A. Inheritance
B. Polymarphism
C. abstraction
D. encapsulation
3 _________ satisfy the condition of polymorphism
A. Carbon
B. Coal
C. Coal
D. all of the given
4 The mechanism of selecting function at run time according to the nature of calling object is called,
A. late binding
B. static binding
C. virtual binding
D. None of the given options
5 Which part of an object exhibits its state?
A. Data
B. Operations
C. Any public part
D. Any private part
6 ________ and ______ methods may not be declared abstract.
A. private,static
B. private,public
C. static,public
D. None of the given
7 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++)
8 A template argument is preceded by the keyword ________.
A. vector
B. class
C. template
D. type*
9 C++ compiler does not allow to dynamically allocate memory for object
A. False
B. True
C. Not sure
10 __________, 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.
A. Friendship is one way only
B. Friendship is two way only
C. NO Friendship between classes
D. Any kind of friendship

Test Questions

Is this page helpful?