CS201 Final Term Quiz 3 July 2023 Set 2 by Miss Mehwish
- Type
- Final term past paper
- Course
- CS201 Introduction to Programming
- Size
- PDF 462 KB
- Updated
- 23 Oct 2026
You get 3 free files a day on the website. Add the Chrome extensionSign in with the extension for 30 a day.
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:
Correct option: c) realloc function
Q2. We cannot use ______________ pointer for storing and reading data from it.
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 _____________.
Correct option: c) void
Q5. What is the storage space of the double data type?
Correct option: b) 8
Q6. Programmer should be very careful about the memory management because it can _____________.
Correct option: b) cause problems of memory leakage and dangling pointers
Q7. Structures are syntactically defined with the word _____________.
Correct option: c) struct
Q8. The `seekp()` function is used to determine the next position to write a character while writing into a file.
Correct option: c) tellp()
Q9. The heap memory structure ______________.
Related CS201 files
All CS201 files →- CS201 Final Term Quiz 3 July 2023 Part 4 by Miss Mehwish Final term PDF 659 KB
- CS201 Final Term Quiz 3 July 2023 by Miss Mehwish Final term PDF 462 KB
- CS201 Final Term Quiz 3 July 2023 Part 5 by Miss Mehwish Final term PDF 658 KB
- CS201 Final Term Quiz 3 July 2023 Part 2 by Miss Mehwish Final term PDF 664 KB
- CS201 Highlighted Handouts by Mickey Ch Highlighted PDF 5.1 MB
- CS201 Quiz 2 Quiz PDF 1.6 MB
Get more out of VUBuddy, for free
- Unlimited downloads
- The explanation behind every MCQ answer
- Study offline on slow data
- 30 downloads a day instead of 3
- Sign in and buy Pro Semester here
One Pro Semester membership works in both the extension and the app.