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

A Matrix can be composed of ints, floats or doubles as their elements. Best way is to handle this

Question # 2

The prototype of friend functions must be written ____ the class and its definition must be written ____.

Question # 3

Which of the following option will be true, if we overload "-=" operator?

Question # 4

If text is a pointer of class String then what is meant by the following statement? text = new String [5];

Question # 5

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

When a value is referred by a normal variable then it is known as,

Question # 7

What is the sequence of event(s) when allocating memory using new operator?

Question # 8

Which of the following function call is correct for the function prototype? defaultParameters ( int a, int b = 7, char z = ‘*’ );

Question # 9

The first parameter of overloaded stream insertion operator is _________ where second parameter is _______ .

Question # 10

Which of the following is the correct C++ syntax to allocate space dynamically for an array of 10 int?

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 Which of the following function is used to increase the size of already allocated memory chunk?
A. malloc
B. calloc
C. realloc
D. free
2 When ever dynamic memory allocation is made in C/C++, it is freed_____________.
A. Explicitly
B. Implicitly
C. Both explicitly and implicitly
D. None of the given options
3 _______ is used to trace the logic of the program and correct the logical errors.
A. Compiler
B. Editor
C. Linker
D. Debugger
4 The stream objects cin and cout are included in which header file?
A. iostream.h
B. fstream.h
C. istream.h
D. ostream.h
5 Friend function of a class is ______________
A. Member function
B. Non-member function
C. Private function
D. Public function
6 Pointer is a variable which store
A. Data
B. Memory Address
C. Data Type
D. Values
7 Memory allocated at run time is a system resource and it is the responsibility of _____ to de-allocate the memory.
A. System
B. Programmer
C. User of program
D. None of given options
8 New and Delete are also used with ___________ and data types as well.
A. Class, Objects
B. Structures, Pointers
C. Both Class and structures
D. None of above
9 If we define an identifier with the statement #define PI 3.1415926 then during the execution of the program the value of PI __________.
A. can not be replaced
B. None of the given options
C. Remain constant
D. can be changed by some operation
10 The endl and flush are _______
A. Functions
B. Operators
C. Manipulators
D. Objects

Test Questions

Share your comments & questions here

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