CS-201 Final Term Exams Preparation Virtual University With Answers

image
image
image

CS-201 Final Term Exams Preparation Virtual University

Sr. # Questions Answers Choice
1 A Matrix can be composed of ints, floats or doubles as their elements. Best way is to handle this _______________ Write a separate class to handle each Use templates Use strings to store all types None of the given options
2 Structured Query Language is used for ______________ Databases Management Networks Writing Operating System none of the given options
3 A template function must have One or more than one arguments Only one argument Zero arguments None of the given options
4 Every class contains _______________. Constructor Destructor Both a constructor and a destructor None of the given options
5 Which value is returned by the destructor of a class? A pointer to the class An object of the class A status code determining whether the class was destructed correctly Destructors do not return a value.
6 Classes defined inside other classes are called ________ classes. looped nested overloaded none of the given options
7 While calling function, the arguments are assigned to the parameters from _____________. left to right right to left no specific order is followed none of the given options
8 The first parameter of operator function for << operator, Must be passed by value Must be passed by reference Can be passed by value or reference Must be object of class
9 What will be the correct syntax to declare two-dimensional array of float data type? float arr{2}{2} ; float arr[2][2] ; float arr[2,2] ; float[2][2] arr ;
10 Consider the following code segment. What will be the output of the following program? int func(int) ; int num = 10 ; int main(){ int num ; num = 5 ; cout << num ; cout << func(num) ; } int func(int x){ return num ; } 5, 5 10, 5 5, 10 10, 10
Download This Set