Professional Documents
Culture Documents
Question Bank
Question Bank
Mary's College
(Autonomous) - Thoothukudi
EndSemester Examination
B.Sc. Computer Science
Core 1 - C+ Programming Sub. Code : 21UCSC21
referred to as the
6. The first line of a function definition is
b) function body c) function call d) prototype
a) declarator
type
7. Afunction that doesn't retum anything has return d) char
b)void c) float
a)int
of a class.
S. Anobject is said to be a /an c)instance d)none of these
b) visitor
a)copy
called
9. The items in an array are c) elements d) none of these
a) members b) objects
type
10. Strings are arrays of b) float c) char d) string
a) int
11.
operator cannot be used to concatenate strings. d) &&
b) & c).
a) +
13. To be accessed from a member function ofthe derived class, data or functions in the base
class must be public or
a) protected b) private c) static d) all of these
14. Aclass that can be derived from more than one base class is called
a) multilevel b) multiple c) hierarchical d) singleinheritance.
15. Which operator is the indirection operator?
a) * b) & c). d) >
16. A
pointer is
a) variable that hold address values b) contents of a variable
c) datatype of a variable d) indication of variable
17. Another name of late binding is
a) static binding b) compile-time binding
c) dynamic binding d) early binding
18. A function can access aclass private data even though it is not a
the class. member function of
a) friend b)abstract c) virtual d) none of these
19. A is a flow of data.
a) stream b) byte c) file d) none of these
20. The istream and ostream classes are
derived from
a) iostream b) ios c) fstream d) ifstream
Section B (7x2 =14)
Answer any SEVEN questions :
21. Define object.
22. Define expression.
23. What is an argument?
24. Define destructor.
Section C (5x6= 30 )
9. What is the index nunber of the last element of an array with 9 elements?
a) 9 b) 8
c)0 d) programmer-defined
13. The content of two pointers points to adjacent variables of type float differ by
a) 2 bytes b) 4 bytes c) 8 bytes d) 16 bytes
16. class cannot be instantiated.
a) Pure b) Abstract c) Concrete d) Real
17. Choosing functions during runtime is called binding.
a) early b) static c) late d) quick
18.
object is used to display error messages while its output is also buffered.
a) log b)err c) clog d) cerr
19. A virtual function is a virtual function that has no body.
a) concrete b) abstract c) pure d) real
20. function returns the current position of the get pointer.
a) tellg b) seekg c) tellp d) seekp
Section B (10 x2 =20 )
Answer any TEN questions:
21. Mention any four object oriented languages.
22. What are the two ways to use #include?
Section C (5r6= 30 )
Answer all questions choosing either (a) or (b) :
33. a) Explain any two characteristics of object oriented language.
(or)
b) Write about the basic C+tt variable types.
Section A (20 x l= 20 )
8. C+ provides inline functions to facilitate reduce function call overhead, mainly forthese
a) small functions b) large functions c) member functions d) None of