CS-304 Final Term Exams Preparation Virtual University With Answers

CS-304 Final Term Exams Preparation Virtual University

Sr. # Questions Answers Choice
1 ________ and ______ methods may not be declared abstract. private,static private,public static,public None of the given
2 We can use "this" pointer in the constructor in the body and even in the initialization list of any class if we are careful, True False Not Sure
3 Inheritance is a way to organize data. add features to existing classes without rewriting them improve data-hiding and encapsulation.
4 What is a class? A class is a section of computer memory containing objects. A class is a section of the hard disk reserved for object oriented programs A class is the part of an object that contains the variables A class is a description of a kind of object.
5 Algorithms can only be implemented using STL containers. Not Sure True False
6 Algorithms can only be implemented using STL containers. True False Not Sure
7 In a de-queue, (chose the best option) data can be quickly inserted or deleted at any arbitrary location. data can be inserted or deleted at any arbitrary location, but the process is relatively slow. (Object-Oriented Programming in C++) data can not be quickly inserted or deleted at either end data can be inserted or deleted at either end, but the process is relatively slow.
8 Suppose you create an uninitialized vector as follows:
vector evec; After adding the statment, evec.push_back(21); what will happen?
The following statement will add an element to the start (the back) of evec and will initialize it with the value 21. The following statement will add an element to the center of evec and will reinitialize it with the value 21. The following statement will delete an element to the end (the back) of evec and will reinitialize it with the value 21 The following statement will add an element to the end (the back) of evec and initialize it with the value 21
9 Vectors contain contiguous elements stored as a[an] ___. variable array function datatype
10 Compiler performs ________ type checking to diagnose type errors, Static Dynamic Bound Unbound
Download This Set

Is this page helpful?