Skip to content
VUBuddy

CS201 Quiz 2 Set 2

Introduction to Programming PDF 3.5 MBUpdated 23 Oct 2026
Quiz CS201 Quiz 2 Set 2 PDF 3.5 MB
vubuddy.com
Type
Quiz
Course
CS201 Introduction to Programming
Size
PDF 3.5 MB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 3.5 MB

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 pages 1, 2, 3 of 82. Download the file for all 82 pages.

CS201 For final term · UPDATED QUIZ 2 2021 · 1. To avoid dangling reference don’t return

The reference of a local variable from the function……confirm

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

Class name operator ++()….confirm from net

  1. Reference is a thing by which we can create ________ of any data type Synonym…..confirm
  2. Reference cannot be uninitialized because it is impossible to ______. Initialize a Null pointer…..confirm

5. The syntax of declaration of a function that returns the reference to an integer is

6. Friend function declaration can go _________ the class

Anywhere in……confirm

7. To prevent dangling reference the functions returning reference should be used with

Static and global variables……….confirm

  1. The only operator that the compiler overloads for user define data type be default in Arrangement (=) operator …..confirm from net

Q9. If operator function is non-member function then object on left side of operator cannot be ______________?

Object of member function…….confirm

  1. Which of the following functionality can be achieved through overloading? New operators cannot be defined through operator overloading

11. The return type of the overloading new operator must be? Void*….confirm from net

  1. For binary member operators, operands on the _________ derives (calls) the operation.

Left…….confirm

13. Identify the correct method of adding two strings, s1 and s2. Strcat(s1,s2)

  1. A friend function of a class is a function defined _________.

Outside that class and that has the right to access all members of the class

  1. Care must be taken about the correct ______ of operator while overloading.

Both Semantic and Complexity……confirm from net

  1. We can _______ reference.

None of the given….confirm

Q17. If text is a pointer of type string then what will be the functionality of following statement?

Text = new String {5}; · Creates array of 5 objects dynamically…..confirm from net · 18. Look at the statement given below

Int & a; and tell what will happen?

Compiler will generate an error ‘a’ declared as reference but not initialized……confirm

19. The syntax of declaration of a function that returns the reference to an integer is

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

Delete []string;….confirm from net

Q21. If we do not write our own assignment operator then which of the following problem may occur?

22. Identify the correct syntax for making a class friend of other class

friend ClassOne · OtherClass; · private; · //here we write the data members of ClassOne · 23. Once an object is declared as a friend ________________

It has access to all non-public members as if they were public….confirm from net

  1. Reference is a thing by which we can create ______ of any data type.

alias or synonym…both………confirm

  1. A _______ function of a class is defined outside that class scope. But it can access all private and protected members of the class. Firend…..confirm
  2. Once the __________ are created they exist for the life time of the program Static variables…..confirm
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.