Professional Documents
Culture Documents
8. False You cannot use the member access operator arrow, ->, to
access the component of an object pointed to by a pointer
10. False The only number that can be directly assigned to a pointer
variable is 1
1/5
Chapter 13 Reviewing the basics
Study online at https://quizlet.com/_6rw6r
17. False the operator new is used to deallocate the memory occu-
pied by a dynamic variable
18. True In C++, both new and delete are reserved words
19. True The operator new has two forms: one to create a single dy-
namic variable and another to create an array of dynamic
variables
2/5
Chapter 13 Reviewing the basics
Study online at https://quizlet.com/_6rw6r
allocates storage of type int somewhere in memory and
stores the address of the allocated storage in p
21. True The operator delete has two forms: one to deallocate
the memory occupied by a single dynamic variable and
another to deallocate the memory occupied by an array of
dynamic variables
24. True To create a dynamic array, the form of the new operator
that creates an array of dynamic variables is used. For
example, if p is a pointer of type int, the statement:
p = new int[10];
creates an array of 10 components of type int. The base
address of the array is stored in p. We call p a dynamic
array.
28. False
3/5
Chapter 13 Reviewing the basics
Study online at https://quizlet.com/_6rw6r
C++ allows a program to create dynamic just single dimen-
sional arrays
29. False In the statement int **board; the variable board is a pointer,
but not a pointer to a pointer
30. False In a deep copy, two or more pointers of the same type point
to the same memory; that is, they point to the same data
31. False In a shallow copy, two or more pointers of the same type
have their own copies of the data
32. False If a class has a destructor, the destructor does not au-
tomatically execute whenever a class object goes out of
scope
33. True If a class has pointer member variables, the built-in as-
signment operators provide a shallow copy of the data
37. True In C++, virtual functions are declared using the reserved
word virtual
40. True
4/5
Chapter 13 Reviewing the basics
Study online at https://quizlet.com/_6rw6r
In addition to the pure virtual functions, an abstract class
can contain instance variables, constructors, and func-
tions that are not pure virtual. However, the abstract class
must provide the definitions of constructors and functions
that are not pure virtual
42. True The address of operator can be used to return the address
of a private member variable of a class
5/5