CS201 Current Spring 2011 Final Term VU Paper [July 2011] Virtual University of Pakistan
Saturday, July 16, 2011 Posted In .Final Term Exam Spring 2011 (July) Edit This1) What is the concept of encapsulation and data hiding? 2 mrks
2) Write down piece of code that will declare a matrix of 3*3.And initialize all its locations with 0. 2 marks
3) Write down the C++ code for the declaration of overlade stream insertion and stream extraction operator for the object data type 2 amrks
4) What is meant by *num and &num? 2 marks
5) How many arguments does binary member operator function and binary non-member operator function take?? 3 marks
6) Find error in the code
Int *p;
p= new int [10];
delete; 3 marks
7) write down the purpose of testing in designing programs 3 marks
8) whish functions are used to determine the state of input stream, briefly explain each fu nction 5 marks
9) Do you agree that in good programming practice , the main() factor is smaller than the class implemented 5 marks
10) What do yoy mean by garbage collection and how it works in JAVA and C++? 5 amrks
11) As we have learned about using degault statement in the switch statement. You are required to describe the purpose using default statement with simple codeing example? 5 marks