- Type
- Final term past paper
- Course
- CS201 Introduction to Programming
- Size
- PDF 230 KB
- 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 of 2. Download the file for all 2 pages.
Date: 20/Aug/2016
CS 201 Final Paper
Q1. What is returned by new operator?
Q2. Which bitwise operator returns true if both bits are different and returns false if both bit are the same?
Q3. When does an get destroyed?
Q4. Suppose an object of class A is declared as data member of class B:
Q5. Assume that you write a program to read the data from a text file. You have two options to do it, either read the data character by character or reading multiple lines of data at a time. Which option do you think is more better and why?
Q6. What do you understand by keyword ‘this’ and what are the uses of ‘this’ pointer?
The keyword of ‘this’ we can using the pointer of the object or class. There was trement of this operator easy can understand of keyword?
- Write a program which defines two variables var1 and var2 of type int and stores two different values in these variables. Print the values of these variable in three different number systems using manipulators dec, hex, oct.
- Write a program in C++, which will prompt the user to input 8 values for a 2x4 matrix. The display those values in 2x4 matrix format.
/* Program Output will look like this: Enter eight values for a 2x4 Matrix:
Matrix entered in its original matrix format:
- Identify the errors in the given code and correct them.
for ( int i==0; j<numRows; i--)
for (int j=0;) j<numCols; j--)
elements [I, j] == m.elements[i][j];
Q10. What will be the output of the following code snipper?
int x = 10; int &y=x, y+=5, cout << x.
Q11. Write down the output of the code given below?
#include <iostream> using name space std; union Num {iInt ValueI, float ValueF, double ValueD, char ValueC,
void main()
// Optional union keyword // ValueI = 100 Num TestVal = (100), count <<”\nInteger=”<<testVal ValueI<<endl; TestVal ValueF =2.123 count <<”Float=”<< TestVal ValueF<<endl; count <<”Uninitialzed double=”<< TestVal ValueD<<endl; cout<<”Some rubbish???”<<endl; TestVal ValueC=’U’, cout<<”Character=”<< TestVal ValueC<<endl;
- Following code segment contains errors. Give brief description of each error.
Class circle:
Private: double centerX, double center, double radius, Public: setCenter(double.double); setRadius(double);
-------------x------------------x--------------------------x------------------------x---------------------x---------------x-------------
Related CS201 files
All CS201 files →- CS201 Final Term MCQs File 4 Final term PDF 445 KB
- CS201 Final Term Solved Papers 3 by Waqar Siddhu Final term PDF 3.5 MB
- CS201 Final Term Past Papers Mega File Final term PDF 738 KB
- CS201 Final Term Short Notes Set 3 Final term PDF 168 KB
- CS201 Highlighted Handouts by VU Topper RM Highlighted PDF 5.4 MB
- CS201 Quiz 1 November 2025 by Lucky Quiz PDF 331 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.