Skip to content
VUBuddy

CS201 Final Term Quiz 3 July 2023 Set 2 by Miss Mehwish

Introduction to Programming PDF 462 KBUpdated 23 Oct 2026
Final term past paper CS201 Final Term Quiz 3 July 2023 Set 2 by Miss Mehwish PDF 462 KB
vubuddy.com
Type
Final term past paper
Course
CS201 Introduction to Programming
Size
PDF 462 KB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 462 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.

Q1. Sometimes after allocating memory, we need additional space. For this purpose, we use:

  1. void pointer
  2. reallocation function
  3. realloc function
  4. calloc function

Correct option: c) realloc function

Q2. We cannot use ______________ pointer for storing and reading data from it.

  1. zero
  2. NULL
  3. integer
  4. double

Correct option: b) NULL

Q3. What will be the output of the following C++ code?

```cpp #include <iostream> #define max 100

int main()

#ifdef max std::cout << " Hello"; #endif return 0;

a) " Hello" b) " Max is 100" c) Error d) Hello

Correct option: a) " Hello"

Q4. For casting, we normally declare a pointer of type _____________.

  1. integer
  2. NULL
  3. void
  4. None of the given

Correct option: c) void

Q5. What is the storage space of the double data type?

  1. 4
  2. 8
  3. 16
  4. 32

Correct option: b) 8

Q6. Programmer should be very careful about the memory management because it can _____________.

  1. affect the logic of the program
  2. cause problems of memory leakage and dangling pointers
  3. return void pointers
  4. create problems of NULL pointers

Correct option: b) cause problems of memory leakage and dangling pointers

Q7. Structures are syntactically defined with the word _____________.

  1. None of the given
  2. struc
  3. struct
  4. structure

Correct option: c) struct

Q8. The `seekp()` function is used to determine the next position to write a character while writing into a file.

  1. seekp()
  2. seekg()
  3. tellp()
  4. tellg()

Correct option: c) tellp()

Q9. The heap memory structure ______________.

  1. remains constant
  2. contains no space
  3. is just like the stack
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.