Skip to content
VUBuddy

CS201 Quiz

Introduction to Programming PDF 444 KBUpdated 23 Oct 2026
Quiz CS201 Quiz PDF 444 KB
vubuddy.com
Type
Quiz
Course
CS201 Introduction to Programming
Size
PDF 444 KB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 444 KB

You get 3 free files a day on the website. Add the Chrome extension for 30 a day.

Unlimited downloads in the Android app Get it free on Google Play

Preview text

Text from page 1 of 1. Download the file for all 1 page.

  1. The stream-insertion operator >> and the stream-extraction operator is<<.

Answer: False

  1. It is possible to return on object from function using this pointer.

Answer: True

  1. A variable which is defined inside a function is called

Answer: None of the given option

  1. When new operator is overloaded at global level then corresponding built-new operator will also be visible to whole of the program

Answer: False

  1. Which of the following syntax is best used to delete an array of 5 objects named string allocated using new operator.

Answer: delete[]string;

Q6. What will the output of following statement?

( cout<<setfill (0) << setw (7) << 128;

Answer: 000128

  1. With user data type variables (objects) self-assignment can produce

Answer: Logical error

  1. In c++ operators, which of the following operator cannot be overloaded

Answer: ?:

  1. Overloaded member operator function is always called by …….

Answer: object

  1. Which of the following is the correct definition of streams? Ans. it is an ordered sequence of bytes
  2. The life time of the static data member of a class is the life time of the…….

Answer: program

  1. What is meant by the following statement? String str[5] = {String(“programming”), string (CS201)};

Answer: Parameterized constructor will be called for all objects of array

Q13. What is the difference between cout and cerr?

Answer: Destructor is called first before deallocating memory

Q14. What is the sequence of event (s) when deallocating memory of an object using delete operator?

Answer: Destructor is called first before deallocating memory

  1. When a variable is defined as static in a lass then ………..

Answer: only one copy is created for all objects of this class

  1. Which of the following syntax is best used to delete an array of 5 objects named string allocated using operator.

Answer: deelte[]string;

  1. Below is given a code snippet ( Char name [50]; cin>> name; cout << name; ) Now if use enters the name, for example “sohail Aslam” than what will be the output of the code?

Answer: Sohail Aslam

Q18. What is the purpose of endl stream manipulator?

Answer: flush the stream

  1. When the compiler overloads the assignment (=) operator by default then

Answer: class members are not assigned properly

  1. Let suppose a= b = c In such situation, it is necessary to return a reference of an object from assignment operator function.

True

  1. Ostream is a ……………….. operator.

Answer: Standalone

  1. The endl and flush are …………………

Answer: Manipulators

Q23. Which one of the following is the declaration of overloaded Pre-increment operator implemented as member function?

Answer: Class-name Operator ++();

  1. For the joining of two strings in string class, we may use ‘+’ operator, can we use ‘-‘ operator the same way for subtracting strings

Answer: Yes

  1. Overloaded delete operator function takes parameter of vaid pointer and returns.

Answer: Void Pointer

  1. When an array of object is created dynamically then there is no way to provide parameterized constructors for array of objects.

Answer: True

  1. Df

28.

All CS201 files →
CS201 Introduction to Programming All CS201 handouts, past papers, quizzes and MCQs in one place. Open course page

Get more out of VUBuddy, for free

Android app Free on Google Play
  • Unlimited downloads
  • The explanation behind every MCQ answer
  • Study offline on slow data
Get the Android app
Chrome extension Free on the Chrome Web Store
  • 30 downloads a day instead of 3
  • Sign in and buy Pro Semester here
Add to Chrome

One Pro Semester membership works in both the extension and the app.