Skip to content
VUBuddy

CS201P Final Term Quiz 12 File 3 July 2023 by Miss Mehwish

Introduction to Programming (Practical) PDF 575 KBUpdated 23 Oct 2026
Final term past paper CS201P Final Term Quiz 12 File 3 July 2023 by Miss Mehwish PDF 575 KB
vubuddy.com
Type
Final term past paper
Course
CS201P Introduction to Programming (Practical)
Size
PDF 575 KB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 575 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 pages 1, 2, 3 of 5. Download the file for all 5 pages.

We also provide Past papers for Mids. and Finals Cross Check your answers before submitting directly from the file. We are not responsible for 100% correction as human error exists

**MCQ 1:** Question: When overloading the assignment (=) operator, which of the following syntax is correct?

  1. `void operator (=) const String &other;`
  2. `void operator = (const String &s);`
  3. `void operator (=) (const String &s);`
  4. `void operator (= String &s);`

Correct option: 2) `void operator = (const String &s);`

**MCQ 2:** Question: What is the correct prototype of overloading the delete operator? Options:

  1. `void *operator delete (size_t, size);`
  2. `void operator delete (void *ptr);`
  3. `void *operator delete (size_t size);`
  4. `new operator delete (void *ptr);`

Correct option: 2) `void operator delete (void *ptr);`

**MCQ 3:** Question: What will be the output of the following code? ```cpp #include <iostream> #include <iomanip> using namespace std;

int main() { int num = 7; cout << setfill('*') << setw(4) << num << endl; return 0;

  1. `7****`
  2. `7***`
  3. `***7`
  4. `****7`

Correct option: 2) `7***`

**MCQ 4:** Question: Which of the following options returns the state of the end of file? Options:

  1. `cin.eof();`
  2. `cin.enof();`
  3. `cin.endof();`
  4. `cin.endoffile();`

Correct option: 1) `cin.eof();`

**MCQ 5:** Question: Which one is not the member function of the input stream? Options:

  1. `cin.read();`
  2. `cin.get();`
  3. `get();`
  4. `cin.getline();`

Correct option: 3) `get();`

**MCQ 6:** Question: In the syntax of the overloaded operator function given below: `Complex operator + (Complex &);` What is ‘operator’?

  1. Keyword
  2. Operand
  3. OperandClass
  4. Class

Correct option: 1) Keyword

All CS201P files →
CS201P Introduction to Programming (Practical) All CS201P 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.