CS201 Final Term Past Papers 3 with References
- Type
- Final term past paper
- Course
- CS201 Introduction to Programming
- Size
- PDF 364 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 10. Download the file for all 10 pages.
Q1. There are mainly -------------------- types of software (1 marks)
Correct answer: Two
Software is categorized into two main categories System Software Application Software
Q2. When x = 7; then the expression x%= 2; will calculate the value of x as, (1 marks)
Correct answer: 1
A pointer variable can be,
Correct answer: Both 1 and 2
Q4. setprecision is a parameter less manipulator. (1 marks)
Correct answer: False
Q5. We can change a Unary operator to Binary operator through operator overloading. (1 marks)
Correct answer: False
Q6. delete operator is used to return memory to free store which is allocated by the new operator (1 marks)
Correct answer: True
The objects are created with the new operator on free store, they will not be destroyed and memory will not be de-allocated unless we call delete operator to destroy the objects and de-allocate memory.
Q7. When we do dynamic memory allocation in the constructor of a class, then it is necessary to provide a destructor. (1 marks)
Correct answer: True
whenever we have a class in which the constructor allocates dynamic memory, it is necessary to provide a destructor that frees the memory.
Q8. What is the functionality of the following statement? (1 marks)
String str[5] = {String(“Programming”), String(“CS201”)};
Correct answer: Parameterized constructor will call for first 2 objects and default constructor for remaining objects
Q9. What is the sequence of event(s) when allocating memory using new operator? (1 marks)
Correct answer: Memory is allocated first before calling constructor
If a single object is allocated, operator new is called to allocate memory, and then the constructor is called to initialize the object.
- If an array of objects is allocated, operator new[] is called to allocate memory for the whole array, and then the constructor is called for each element of the array.
- When a single object is deleted, the destructor for the object is called first, and then operator delete is called to free the memory occupied by the object.
- When an array of objects is deleted, the destructor for each element of the array object is called first, and then operator delete[] is called to free the memory occupied by the array.
Q10. Deleting an array of objects without specifying [] brackets may lead to memory leak (1 marks)
Q11. Which of the following data type will be assumed if no data type is specified with constant? (1 marks)
Correct answer: int
Q12. There is an array of characters having name ‘course’ that has to be initialized by string ‘programming’ which of the following is the correct way to do this, (1 marks)
i. course[] = {‘p’, ’r’, ’o’, ’g’, ’r’, ’a’, ’m’, ’m’, ’i’, ’n’, ’g’}; ii.course[] = ‘programming’ ; iii. course[12] = “programming” ; iv. course = “programming” ; Choose the correct options.
Correct answer: (i) and (iii) only
Q13. What will be the correct syntax of the following statement? (1 marks)
ptr is a constant pointer to integer.
Correct answer: int *const ptr ;
The keyword const for pointers can appear before the type, after the type, or in both places. The following are legal declarations: const int * ptr1; /* A pointer to a constant integer: the value pointed to cannot be changed */ int * const ptr2; /* A constant pointer to integer: the integer can be changed, but ptr2 cannot point to anything else */ const int * const ptr3; /* A constant pointer to a constant integer: neither the value pointed to nor the pointer itself can be changed */
Related CS201 files
All CS201 files →- CS201 Final Term Notes 2 by VUBuddy Final term PDF 258 KB
- CS201 Final Term MCQs File 2 Final term PDF 451 KB
- CS201 Final Term Past Papers Set 3 by VUBuddy Final term PDF 2.2 MB
- CS201 Final Term MCQs and Short Notes 2023 by Learning Zone Final term PDF 279 KB
- CS201 Complete Handouts Set 2 Handout PDF 3 MB
- CS201 Quiz Jan 2026 Quiz PDF 15 KB
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.