Skip to content
VUBuddy

CS201 Final Term Past Papers

Introduction to Programming PDF 1.7 MBUpdated 23 Oct 2026
Final term past paper CS201 Final Term Past Papers PDF 1.7 MB
vubuddy.com
Type
Final term past paper
Course
CS201 Introduction to Programming
Size
PDF 1.7 MB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 1.7 MB

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 249. Download the file for all 249 pages.

Marks: 58

Q1. *.doc is _____________ by type. (1 marks)

  1. Sequential File
  2. Random Access File
  3. Data File
  4. Record File

Q2. Which of the following is NOT a preprocessor directive? (1 marks)

  1. #error
  2. #define
  3. #line
  4. #ndefine

Q3. The return type of operator function must always be void. (1 marks)

  1. True
  2. False

The syntax of the prototype of the overloaded operator function is: return-type operator operator-symbol (parameter-list);

Q4. What does (*this) represents? (1 marks)

  1. The current function of the class
  2. The current pointer of the class
  3. The current object of the class
  4. A value of the data member

Whenever an object calls a member function, the function implicitly gets a pointer from the calling object. That pointer is known as this pointer. „this’ is a key word. We cannot use it as a variable name. „this’ pointer is present in the function, referring to the calling object. For example, if we have to refer a member, let‟s say buf, of our Stringclass, we can write it simply as: buf ;

Q5. The statement cin.get (); is used to, (1 marks)

  1. Read a string from keyboard
  2. Read a character from keyboard
  3. Read a string from file
  4. Read a character from file

Q6. When we do dynamic memory allocation in the constructor of a class, then it is necessary to provide a destructor. (1 marks)

  1. True
  2. False

Q7. Overloaded new operator function takes parameter of type size_t and returns (1 marks)

  1. void (nothing)
  2. void pointer
  3. object pointer
  4. int pointer

Q8. The second parameter of operator functions for <<>> are objects of the class for which we are overloading these operators. (1 marks)

  1. True
  2. False

The second parameter to operator << is an object of the class that we are overloading the operator for. Similar is the case for operator >>.

Q9. C++ is a case-sensitive language (1 marks)

  1. True
  2. False

Q10. To include code from the library in the program, such as iostream, a directive would be called up using this command. (1 marks)

  1. #include “iostream.h”
  2. include
  3. include
  4. #include

Q11. A template function must have only generic data types. (1 marks)

  1. True
  2. False

Its not compulsory, only min we have one generic data type but we can have native data type as well.

Q12. Template class can not have static variables. (1 marks)

  1. True
  2. False

Q13. What will be the correct syntax to assign an array named arr of 5 elements to a pointer ptr? (1 marks)

  1. *ptr = arr ;
  2. ptr = arr ;
  3. *ptr = arr[5] ;
  4. ptr = arr[5] ;

Q14. What will be the correct syntax to access the value of fourth element of an array using pointer ptr? (1 marks)

  1. ptr[3]
  2. (ptr+3)
  3. *(ptr+3)
  4. Both 1and 3

try this demo program to confirm result I wrote for you. 2 option will print the reference rest 1,3 are righ options

#include #include // #include main()

int myarr [4]= {0,1,2,3}; int *ptr ; ptr = myarr; cout< cout<<*(ptr+3); cout<<(ptr+3); int i = 0; cin>> i;

Q15. If most significant bit of un-signed number is 1 then it represents a positive number. (1 marks)

  1. True
  2. False

The most significant bit is used as a sign bit. If this bit is zero, the number is considered positive. However, if it is 1, the number will be considered negative.

Q16. If there is a symbol (& sign) used with the variable name followed by data type then it refers to _____ and if & is being used with variable name then it refers to _____. (1 marks)

  1. Address of variable, reference variable
  2. Reference variable, value of variable
  3. Reference variable, address of variable
  4. Address of variable, value of variable

we see a data type followed by & sign, it‟s a reference. And when the & sign is being used in the code with a variable name then it is the address of the variable

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.