Documente Academic
Documente Profesional
Documente Cultură
3.When a language has the capability to produce new data types, it is said to be
a)reprehensible
b)encapsulated
c)overloaded
d)extensible-Answer
4.A normal C++ operator that acts in special ways on newly defined data types is said to be
a)glorified
b)encapsulated
c)classified
d)overloaded-Answer
8.True or false In an assignment statement, the value on the left of the equal sign is always equal to the
value on the right-False
9.True or false: Its perfectly all right to use variables of different data types in the same arithmetic
expression.-True
12.True or false:Relational operators have a higher precedence than arithmetic operators. -False
13.The library function exit () causes an exit from
a)the loop in which it occurs
b)the block in which it occurs
c)the function in which it occurs
d)the program in which it occurs-Answer
24.Overloaded functions
a)are a group of functions with the same name
b)all have the same number and types of arguments
c)make life simpler for programmers-Answer
d)may fail unexpectedly due to stress
28.True or false:In a class you can have more than one constructor with the same name - True
29.An array element is accessed using
a)a first-in first-out approach
b)the dot operator
c)a member name
d)an index number-Answer
31.To convert from a user-defined class to a basic type, you would most likely use
a)a built-in conversion function
b)a one-argument constructor
c)an overloaded = operator
d) a conversion function thats a member of the class-Answer
32.Inheritance is a way to
a)make general classes into more specific classes-Answer
b)pass arguments to objects of classes
c)add features to existing classes without rewriting them-Answer
d)improve data-hiding and encapsulation
36.A pointer is
a)the address of a variable
b)an indication of the variable to be accessed next
c)a variable for storing addresses -Answer
d)the data type of an address variable
39.If you wanted to sort many large objects or structures, it would be most efficient to
a)place them in an array and sort the array
b)place pointers to them in an array and sort the array-Answer
c)place them in a linked list and sort the linked list
d)place references to them in an array and sort the array
41.To write data that contains variable of type float, to an object of type of stream, you should use
a)the insertion operator
b)seekg ()
c)write ()-Answer
d)put ()
42. Mode bits such as APP and ATE cant do any of the following:
a)are defined in the IOS class
b)can specify if a file is open for reading or writing
c)work with the put() and get() functions-Answer
d)specify ways of opening a file
43.Redirection redirects
a)a stream from a file to the screen -Answer
ba file from a device to a stream
c)a device from the screen to a file
d)the screen from a device to a stream
46.___________ allocates multiple blocks of storage, each of the same size. and then sets all bytes to
zero.
a)malloc
b)calloc-Answer
c)free
d)realloc
47.Structures which contain a member field that point to the member field that point to the same
structure types are called
a)structure within a structure
b)self-referencial structure-Answer
c)unions