Saturday, February 12, 2011

Cs201 Final Term Current Paper (Feb 2011)

Cs201 Final Term Current Paper (Feb 2011)

40 Mcqs 12-2-2011 fall 2010 final tram paper of cs201 

Q 1: How we can avoid a dangling reference? Marks[2]
Q 2: what is the source and destination of the cin stream? Marks [2]
Q 3: Give the general syntax of class template? Marks [2]
Q 4: Learning a program is important because it delelops____and____abilities.Marks [2]
Q 5; What is the main difference between structure and array? Marks [3]
Q 6: Identify all the given function as member function of input stream or output stream.
get,unget,put,getline,peek,putline. Marks [3]
Q 7: Is it possible to overload operators for primitive data types? Justify your answer. Marks [3]
Q 8: Read the given below code and explain what task is being performed by this function 

Matrix :: Matrix ( int row , int col ) 
{
numRows = row ;
numCols = col ;
elements = new ( double * ) [ numRows ] ;
for ( int i = 0 ; i < numRows ; i ++ )
{
elements [ i ] = new double [ numCols ] ;
for ( int j = 0 ; j < numCols ; j ++ )
elements [ i ] [ j ] = 0.0 ; 
}
}



Hint : This function belong to a matrix class, having 
Number of Rows = numRows
Number of Columns = numCols. Marks [3]

Q 9: Write the procedure of data insertion in middle of the files by merge method, as practiced in older systems?

Q 10: Do you agree that in good programming practice the main() function is smaller than the class implemented. If your answer is No then argue and if Yes then support your answer briefly. Marks [5]
Q 11: Suppose we have the following class
Class Matrix
{
Private:
int Elements[3][3];
};
Write the operator function of stream extraction operator(>>) for this class. Marks [5]
Q 12: What is meant by user interface and class interface in c++? And what role a class interface can play in user interface. Marks [5]

No comments:

Post a Comment