Question: c++ 1.You can use #define to define a name for a C++ variable. True/False 2.Suppose an exception of type E is thrown in a function

c++

1.You can use #define to define a name for a C++ variable.

True/False

2.Suppose an exception of type E is thrown in a function but not listed in the exception specification, and is not caught in the function. The exception will be caught in a calling function that has a catch block that declares an exception of that type.

True/False

3.Setting the width of output with call to the width member function, affects only the next output.

True/False

4.Most applications that use a stack will store a struct or class object on the stack.

True/False

5.

The operator * is prefixed to an iterator to insert an element in the container.

True/False

6.A function does not have an exception specification at all, so exceptions are prohibited.

True/False

7)A base/member initialization list produces results that are exactly _______

a)assignment

b)redeclaration

c)redefinition

d)

initialization

e)output

8)

It is useful to define a class for which no objects may be defined.

True/False

9)The binary search algorithm in the text makes recursive on subarrays of the array passed to the algorithm. The index values of the array the algorithm searches run from first to last. The subarrays are dermined using the mid-point. How is the mid point calculate?

a)mid=(first - last)/2;

b)mid=(first + last)/2;

c)mid=(first + last)%2;

d)mid=(first - last)%2;

10)

A tree is a recursive structure.

True/False

11)In type matching to select a catch block, only exact matches work.

True/False

12)Which of the following can be virtual?(can have mutiple answers)

a)Constructors

b)Destructors

c)Ordinary functions

d)friend functions

e)static functions

13)If the override specifier is added to the end of a member function declaration, what happens if the function is not specified as virtual in the parent class?

a)the function is overridden in the derived class

b)there is a compiler error.

c)the funtion in the parent class will always be invoked.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!