Question: QUESTION 1 A pointer should be initialized to A. nullptr, an address B. nptr, *nPtr C. pointer = *Ptr; D. type of a pointer E.

QUESTION 1

A pointer should be initialized to

A.

nullptr, an address

B.

nptr, *nPtr

C.

pointer = *Ptr;

D.

type of a pointer

E.

None of the above

QUESTION 2

The _________ , also known as the address operator, returns the memory address of a variable.

A.

asterisk ( * )

B.

ampersand ( & )

C.

percent sign (%)

D.

exclamation point ( ! )

E.

None of the above

QUESTION 3

The statement

int *ptr;

has the same meaning as

A.

int ptr;

B.

*int ptr;

C.

int ptr*;

D.

int* ptr;

E.

None of the above

QUESTION 4

Look at the following statement:

sum += *array++;

This Statement is :

A.

is illegal in C++

B.

will always result in a compiler error

C.

assigns the dereferenced pointer's value, then increments the pointer's address

D.

increments the dereferenced pointer's value by one, then assigns that value

E.

None of the above

QUESTION 5

Class members specified as private are accessible only to member functions of the class and friends of the class.

True

False

QUESTION 6

The Catch handle of an exception:

A. Throw the exception

B. Process the exception

C. nothing

D. quit the program

E. None of the above

QUESTION 7

Select all that apply about Exceptions.

A.

Indicate that something unexpected has occurred or been detected

B.

Allow a program to deal with the program in a controlled manner

C.

Can be used to assn a object of a class to another object of the same class

D.

Can be as simple or complex as program design requires

E.

Exceptions can be declared public, private or pretected

QUESTION 8

Static data members have class scope and can be declared public, private or protected.

True

False

QUESTION 9

A good reason for overloading an operator is to enable it to:

A.

outperform its C language counterparts

B.

work in its usual way, but with programmer-defined data types

C.

operate on more operands than in its standard definition

D.

operate on no operands

E.

None of the above

QUESTION 10

A reason to overload the ____________ is to write classes that have array-like behaviors.

A.

parentheses ( ) operator

B.

curly braces { } operator

C.

square brackets [ ] operator

D.

colon : : operator

E.

None of the above

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!