Skip to content
VUBuddy

CS201P Final Term Quiz 8 July 2023 by Miss Mehwish

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

Q1. In C++, `atof()` function is used to convert ________.

  1. Character string to long integer
  2. Character string to integer
  3. Character string to short
  4. Character string to float

Correct option: d) Character string to float

Q2. In C/C++ language, the subscript of an array starts from ______.

  1. 0
  2. 1
  3. 2
  4. 3

Correct option: a) 0

Q3. Which of the following is not a file opening mode?

  1. ios::trunc
  2. ios::nocreate
  3. ios::ate
  4. ios::in

Correct option: b) ios::nocreate

Q4. In C++, what is the correct syntax for accessing the fifth element of an array?

  1. a[5]
  2. a[4]
  3. a(5)
  4. a(4)

Correct option: b) a[4]

Q5. In C++, the precise way to declare a pointer is:

  1. int ptr*;
  2. int ptr;
  3. int * ptr;
  4. int & ptr;

Correct option: c) int * ptr;

Q6. To create an output file stream, we must declare the stream to be of class:

  1. iostream
  2. ifstream
  3. ofstream
  4. cstream

Correct option: c) ofstream

Q7. Which of the following is the correct method to declare an array?

  1. [size] array name data type;
  2. data type array name [size];
  3. array name data type [size];
  4. array name [size] data type;

Correct option: b) data type array name [size];

Q8. From the following code, what will be the size of the array "name"?

char name[] = " My full name";

a) 12 b) 1 c) 3 d) 14

Correct option: d) 14

Q9. What will be the output of the following code?

int main() {

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.