You are on page 1of 10
1. In C+, a function contained within a clas is called (A) Member function (B) An operator (©) Acclass funetion () Amethod 22. Which ofthe folowing are good reason to use un object oriented language? (A) You can define your own datatypes (B) Program statements are simpler than in procedural languages (© An object oriented program can be (D) is easier 10 conceptualize an object taught correct its own eroes vierted program 3. Annormal C+ operator that acts in special ways on newly defined datatypes are said to be (A) Glorified (B) Encapsulator (© Classified (D) Overloaded 4. Dividing the program into functions (A) Is the key to objectoriented (B) Makes the program easier to conceptualize programming (© May reduce the size of the program (D) Makes the program run faster ‘5. In.aclass definition, data (or) functions designated private are accessible (A) Tony function inthe program (B) Only if you know the password (©) Tomember functions ofthat class (D) Only to public members ofthe class ‘6. The dot operator connects the following two entities (A) A class member and aclass object (B) A class object and a class (©) Alas and amember ofthat class (D) A class object and member of that class 7. Classes are useful because they (A) Are removed from memory when not (B) Permit data to be hidden from other classes inuse () ia sores ores Ces ‘Can closely model objects in the real world 8. ACH stream is (A) Afile (B) The flow of control through a function (© A flow of data from one place to (D) Associated with « particular class 9. We can output text to an object of class of stream using the insertion operator << because (A) The ofsream class is stream —(B) The insertion opersioe works with all clases (©) Weare sca out puting w cast (D) The leaden opener i overloaded in 10, To write data that contains variables of type float 1 an object of type of stream you should we (A) Insertion operator (B) Seeks () (©) Write) ©) Pac, 1. Command line arguments are (A) Disagreement inthe military © Type fitevng « eg mane ot te (© Aecmsed trough expat wo (D) hese ely fo dk ie main () 12 A wml pore convenient way mi ail (A) Vaciables B) Functions © Cimes (D) Programs 13, An exception is caused by (A) The programmer who writes an (B) ‘The creator ofa clase application code (©) Aruntime enor (D) An operating system malfimetion that terminates the program 14, Exceptions are thrown (A) From the catch block to the try block (B) From a throw statement to the try block (©) Prom te poo ofthe corto cach (D) Froma throw statement oa ach lock 15, Adkliional information sent when an exception i placed in (A) The throw keyword (B) The function that caused th eror (©) The catch block (D) An object ofthe exception clas 16. A template class is shown in the UML as (A) An arty clas wid) someting (B) A dabd line (©) Arectange witha dashed ine (D) A sod line 17. Which ofthe fotowing type of class allows oly one objeto tobe created? (A) Virtual cass (B) Abstract clas (©) Singleton class (D) Friend class 18, Which ofthe following is not a type of constructor? (A) Copy constructor (@) Friend constrctor (© Defi constructor (D) Parameterized constructor 19, Which ofthe following is not the member of class? (A) Static funeton (B) Friend function (© Const function (D) Virwal function 20, Which ofthe following concepts means determining at runtime what method to invoke? (A) Data hiding (B) Dynamic typing (© Dynamic Binding (D) Dynamic lading Which ofthe following are procedure languages? (A) Pascal (B) Sonal atk oc (D) Both (A) and (B) ‘The break statement causes an exit (A) From the inner most loop only (B) Only from the innermost switch (C) From all loops and switches (D) From the inner most or switch }. Which statement gets affected when i++ is changed to +-+4? (A) 5-20; i645; (B) For (0; +20; 1++)( ) (©) Aw ies: (D) While (+420) count

You might also like