Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

QUESTION 1 A pointer should be initialized to nullptr, an address nptr, *nPtr po

ID: 3861199 • Letter: Q

Question

QUESTION 1

A pointer should be initialized to

nullptr, an address

nptr, *nPtr

pointer = *Ptr;

type of a pointer

None of the above

QUESTION 2

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

asterisk ( * )

ampersand ( & )

percent sign (%)

exclamation point ( ! )

None of the above

QUESTION 3

The statement

int *ptr;

has the same meaning as

int ptr;

*int ptr;

int ptr*;

int* ptr;

None of the above

QUESTION 4

   
Look at the following statement:
     

      sum += *array++;


This Statement is :

is illegal in C++

will always result in a compiler error

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

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

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.

Indicate that something unexpected has occurred or been detected

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

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

Can be as simple or complex as program design requires

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:

outperform its C language counterparts

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

operate on more operands than in its standard definition

operate on no operands

None of the above

QUESTION 10

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

parentheses ( ) operator

curly braces { } operator

square brackets [ ] operator

colon : : operator

None of the above

A.

nullptr, an address

B.

nptr, *nPtr

C.

pointer = *Ptr;

D.

type of a pointer

E.

None of the above

Explanation / Answer

Q_1

Answer (A)

Q_2
Answer(B) ambperson(&)

Q_3

Answer(D) int* ptr

Q_4
Answer(C) assigns the dereferenced pointer's value, then increments the pointer's address

Please ask other questions as separate questions as per Chegg Policy Cheers :)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote