A directory of Objective Type Questions covering all the Computer Science subjects. Here you can access and discuss Multiple choice questions and answers for various compitative exams and interviews.

41. You can read input that consists of multiple lines of text using
a. the normal cout << combination
b. the cin.get( ) function with one argument
c. the cin.get( ) function with two arguments
d. the cin.get( ) function with three arguments
View Answer Report Discuss Too Difficult! Search Google
Answer: (c).the cin.get( ) function with two arguments

42. The keyword friend does not appear in
a. the class allowing access to another class
b. the class desiring access to another class
c. the private section of a class
d. the public section of a class
View Answer Report Discuss Too Difficult! Search Google
Answer: (c).the private section of a class

43. The process of building new classes from existing one is called
a. Structure
b. Inheritance
c. Polymorphism
d. Template
View Answer Report Discuss Too Difficult! Search Google
Answer: (b).Inheritance

44. If you wanted to sort many large objects or structures, it would be most efficient to
a. place them in an array & sort the array
b. place pointers to them in an array & sort the array
c. place them in a linked list and sort the linked list
d. place references to them in an array and sort the array
View Answer Report Discuss Too Difficult! Search Google
Answer: (c).place them in a linked list and sort the linked list

45. A friend function to a class, C cannot access
a. private data members and member functions
b. public data members and member functions
c. protected data members and member functions
d. the data members of the derived class of C
View Answer Report Discuss Too Difficult! Search Google
Answer: (d).the data members of the derived class of C

46. The operator that cannot be overloaded is
a. ++
b. ::
c. ( )
d. ~
View Answer Report Discuss Too Difficult! Search Google
Answer: (b).::

47. A struct is the same as a class except that
a. there are no member functions
b. all members are public
c. cannot be used in inheritance hierarchy
d. it does have a this pointer
View Answer Report Discuss Too Difficult! Search Google
Answer: (c).cannot be used in inheritance hierarchy

48. Pure virtual functions
a. have to be redefined in the inherited class
b. cannot have public access specification
c. are mandatory for a virtual class
d. None of the above
View Answer Report Discuss Too Difficult! Search Google
Answer: (a).have to be redefined in the inherited class

49. Additional information sent when an exception is thrown may be placed in
a. the throw keyword
b. the function that caused the error
c. the catch block
d. an object of the exception class
View Answer Report Discuss Too Difficult! Search Google
Answer: (c).the catch block

50. Use of virtual functions implies
a. overloading
b. overriding
c. static binding
d. dynamic binding
View Answer Report Discuss Too Difficult! Search Google
Answer: (d).dynamic binding

Page 5 of 26