Exam 10: Pointers

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

The delete operator should only be used on pointers that

Free
(Multiple Choice)
4.8/5
(36)
Correct Answer:
Verified

D

To dereference a structure pointer and simultaneously access a member of the structure, the appropriate operator to use is

Free
(Multiple Choice)
5.0/5
(38)
Correct Answer:
Verified

C

You may use the type pointer to a structure as the type of a

Free
(Multiple Choice)
4.9/5
(45)
Correct Answer:
Verified

D

A pointer with the value 0 (zero)is called the NULL pointer.

(True/False)
4.8/5
(39)

It is possible for a structure to contain as a member a pointer to its own structure type.

(True/False)
4.9/5
(35)

The expression *s->p; is only meaningful if s is a pointer to a structure and p is a pointer that is a member of that structure.

(True/False)
4.8/5
(33)

A reason for passing a pointer to a function is

(Multiple Choice)
4.8/5
(45)

If dynamically allocated memory is not freed,

(Multiple Choice)
4.8/5
(37)

The expression s->m has the same meaning as (*s).m.

(True/False)
4.8/5
(33)

If a variable occupies more than one byte of memory, its address is

(Multiple Choice)
4.9/5
(38)

Memory cannot be allocated after a program is already running.

(True/False)
4.8/5
(33)

A pointer can be passed as an argument to a function.

(True/False)
4.7/5
(33)

The and operators can respectively be used to increment and decrement a pointer variable.

(Multiple Choice)
4.8/5
(36)

It is legal to subtract a pointer variable from another pointer variable.

(True/False)
4.8/5
(44)

With pointer variables you can access, but you cannot modify, data in other variables.

(True/False)
4.7/5
(34)

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

(Multiple Choice)
4.9/5
(43)

The statement Rectangle * boxPtr; defines a variable boxPtr to be a pointer pointing to a type Rectangle.

(True/False)
4.8/5
(30)

A pointer may be initialized with

(Multiple Choice)
4.7/5
(33)

If Circle is a structure type, the statement Circle *pcirc;

(Multiple Choice)
5.0/5
(37)

A statement that displays the address of the variable num1 is

(Multiple Choice)
5.0/5
(41)
Showing 1 - 20 of 50
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)