Chapter 12 Pointers

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

( True/False ) A pointer is a reserved word

False

( True/False ) Dynamic variables are destroyed using the operator new

False

( True/False ) If a pointer p points to a dynamic array, the elements of p can be processed using a rang-based for loop

False

( True/False ) If p is a pointer variable, then the statement p = p * 2; is valid in c++

False

( True/False ) Pointer variables are declared using the word pointer

False

( True/False ) The address of operator returns the address and value of its operand

False

( True/False ) The binding of virtual functions occurs at compile time

False

( True/False ) The dereferencing operator has a higher precedence than the dot operator

False

( True/False ) The statement delete p; deallocates the variable pointer p.

False

What do pointers variables contain as their values?

The address of other variables

( True/False ) Given the declaration: int list[10]; int *p; the statement: p = list; is valid in C++

True

( True/False ) If p is a pointer variable, then *p refers to the memory location to which p points.

True

( True/False ) In a shallow copy, two or more pointers of the same type point to the same memory

True

( True/False ) No name is associated with the pointer data type

True

( True/False ) The return type of a function can be pointer

True

( True/False ) The statement delete p; deallocates the dynamic variable that is pointed to by p

True

( True/False ) Variables that are created during program execution are called dynamic variables

True

Given the declaration: int *p; the statement: p = new int[50]; dynamically allocates an array of 50 components of type int, and p contains the base address of the array

True


Kaugnay na mga set ng pag-aaral

Texas Principals of Real Estate - Part 2 (part 1)

View Set

Inflammatory Bowel Disease (case study)

View Set

New Close Up B1 Unit Two Vocabulary

View Set

Chapter 21 - Solid and Hazardous Wastes Quiz Questions

View Set

Types of Populations, Services, and Fulfilling Needs (Instruction/Assignment)

View Set

ATI Nurse's Touch: Professional Communication Practice Assessment Test

View Set