- Type
- Final term past paper
- Course
- CS201 Introduction to Programming
- Size
- PDF 1.7 MB
- Updated
- 23 Oct 2026
You get 3 free files a day on the website. Add the Chrome extension for 30 a day.
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)
Q2. Which of the following is NOT a preprocessor directive? (1 marks)
Q3. The return type of operator function must always be void. (1 marks)
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)
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)
Q6. When we do dynamic memory allocation in the constructor of a class, then it is necessary to provide a destructor. (1 marks)
Q7. Overloaded new operator function takes parameter of type size_t and returns (1 marks)
Q8. The second parameter of operator functions for <<>> are objects of the class for which we are overloading these operators. (1 marks)
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)
Q10. To include code from the library in the program, such as iostream, a directive would be called up using this command. (1 marks)
Q11. A template function must have only generic data types. (1 marks)
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)
Q13. What will be the correct syntax to assign an array named arr of 5 elements to a pointer ptr? (1 marks)
Q14. What will be the correct syntax to access the value of fourth element of an array using pointer ptr? (1 marks)
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)
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)
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
Related CS201 files
All CS201 files →- CS201 Final Term Past Paper Fall 2005 Final term PDF 191 KB
- CS201 Final Term MCQs File 4 Final term PDF 445 KB
- CS201 Final Term Past Papers by VU Stars Final term PDF 4.4 MB
- CS201 Final Term MCQs Set 2 Final term PDF 457 KB
- CS201 Highlighted Handouts Set 2 by VU Topper RM Highlighted PDF 5.2 MB
- CS201 GDB 1 Solution 2022 by VU Expert GDB PDF 509 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.