VU CS-201 Online Test Preparation

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

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

  • Total Questions10

  • Time Allowed10

CS-201 Final Term Exams Preparation Virtual University

00:00
Question # 1

When an object of a class is defined inside an other class then

Question # 2

Consider the following code segment. What will be the output of following code? Int addValue (int *a){ int b = (*a) + 2; return b ; } main () { int x =6 ; cout << x << “,” ; cout << addValue(&x) << “,” ; cout << x ; }.

Question # 3

For which array, the size of the array should be one more than the number of elements in an array?

Question # 4

New operator is used to allocate memory from the free store during

Question # 5

The number 544.53 must be stored in _____ data type.

Question # 6

Which of the following function calling mechanism is true for the function prototype given below?

Question # 7

To include code from the library in the program, such as iostream, a directive would be called up using this command.

Question # 8

Which of the following function do NOT initialize the chunk of memory to all zero?

Question # 9

Every class contains _______________.

Question # 10

Array is a data structure which store

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


Topic Test

00:00

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

  • G
    Ghazia Zainab 15 - Feb - 2024 00 Min 12 Sec 10/10
  • A
    Areeba Mushtaq 21 - Jul - 2024 00 Min 44 Sec 10/10
  • A
    Asad Khan 07 - Dec - 2023 00 Min 50 Sec 10/10
  • H
    Hamna Younas 30 - Jul - 2024 00 Min 53 Sec 10/10
  • T
    Tayyab Zafar 03 - Mar - 2024 01 Min 19 Sec 10/10
  • S
    Saim G 01 - Aug - 2025 01 Min 23 Sec 10/10
  • B
    bc230212222 ALINA SALEEM 13 - Feb - 2024 02 Min 26 Sec 10/10
  • A
    aayan ali 19 - Jul - 2024 01 Min 01 Sec 9/10
  • M
    maheen mughal 22 - Jul - 2024 02 Min 26 Sec 9/10
  • M
    Misbah Mehdi 21 - Jul - 2024 02 Min 28 Sec 9/10
  • Z
    Zain Ali Mirza 27 - Jul - 2024 01 Min 03 Sec 8/10
  • M
    Muhammad Arif 19 - Feb - 2024 01 Min 06 Sec 8/10
  • M
    Malik Zariii 12 - Dec - 2023 03 Min 41 Sec 8/10
  • A
    Ali Gohar 12 - Feb - 2024 00 Min 53 Sec 7/10
  • J
    Jehanzaib khalil 11 - Dec - 2023 01 Min 14 Sec 7/10

Virtual University CS-201 Chapter 1 Important MCQ's

Sr.# Question Answer
1 "new" and "delete" keywords are _____________ in C++ language
A. Built-in- Function
B. Operators
C. Memory Allocation Function
D. None of the given options
2 What is the sequence of event(s) when deallocating memory using delete operator?
A. Only block of memory is deallocated for objects
B. Only destructor is called for objects
C. Memory is deallocated first before calling destructor
D. Destructor is called first before deallocating memory
3 Overloaded delete operator function takes parameter of void pointer and returns.
A. void
B. void pointer
C. pointer to an object
D. pointer of type int
4 A Matrix can be composed of ints, floats or doubles as their elements. Best way is to handle this.
A. Write a separate class to handle each
B. Use templates
C. Use strings to store all types
D. None of the given options
5 If text is a pointer of class String then what is meant by the following statement? text = new String [5];
A. Creates an array of 5 string objects statically
B. creates an array of 5 string objects dynamically
C. Creates an array of pointers to string
D. Creates a string Object
6 New operator allocates memory from free store and return.
A. A pointer
B. A reference
C. An integer
D. A float
7 Which situation would require the use of a non-member overloaded operator?
A. The overloaded operator is an Assignment operator
B. The left most operand is an object of a class
C. The left operand is built-in data type
D. The operator returns a reference
8 NULL value has been defined in ______ and _________ header files.
A. strings.h and iostream.h
B. ctype.h and conio.c
C. conio.c and conio.h
D. stdlib.h and stddef.h
9 Friend functions are _____ of a class
A. Member functions
B. Public member functions
C. Private member functions
D. Non-member functions
10 A Pointer is a special variable that contain.
A. Data values
B. Memory Address
C. Both data and values
D. None of the given option

Test Questions