CS201 Current Papers Shared by Students
- Type
- Quiz
- Course
- CS201 Introduction to Programming
- Size
- PDF 531 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 5. Download the file for all 5 pages.
CS201 paper details: 40 MCQs (1 marks each) 5x short questions (3 marks each) 5 Long Questions (5 marks each)
SHORT QUESTIONS:
Q1. what's the code output (3 marks)
reference data type wla quesion tha
Q2. find errors in the code (3 marks)
if else wali loop thi
Q3. when objects are created, data members are not initialized. why? how to fix it? (3 marks)
Q4. how to declare and initialize static data members in a class (3 marks)
Q5. Class A is nested inside class B so
b: whose deconstructor will get called first?
LONG QUESTIONS:
Q6. What are classes objects? explain with an example (5 marks)
Q7. Write a program that asks user for weight in kg and print the weight converted in pounds on screen (5 marks)
Q8. Initialize 3 double variables with decimal points of varying length and print up to different number of decimal marks using setpercision() stream manipulator. (5 marks)
- Find errors in the code: (classes related code tha last chapter se)
10) A class code is given. Initialize an object with new keyword of the class and use all the member functions of the class and then use delete operator to de-allocate the object. (5 marks) Date: 20/Aug/2016
CS 201 Final Paper
1. What is returned by new operator? 2. Which bitwise operator returns true if both bits are different and returns false if both bit are the same? 3. When does an get destroyed? 4. Suppose an object of class A is declared as data member of class B:
a. The constructor of which class will be called first? b. The destructor of which class will be called first?
5. 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?
6. 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? 7. Write a program which defines two variables var1 and var2 of type int and stores two different values in th ese variables. Print the values of these variable in three different number systems using manipulators dec, hex, oct. 8. 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. /* P rogram 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];
10. What will be the output of the following code snipper? i nt x = 10; i nt &y=x,
Related CS201 files
All CS201 files →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.