Term
9.13 Each byte in memory is assigned a unique ______. |
|
Definition
|
|
Term
9.14 The ______ operator can be used to determine a variable's address. |
|
Definition
|
|
Term
9.15 _______ variables are designed to hold addresses. |
|
Definition
|
|
Term
9.16 The _______ operator can be used to work with the variable a pointer points to. |
|
Definition
|
|
Term
9.17 Array names can be used as ______, and vice versa. |
|
Definition
|
|
Term
9.18 Creating variables while a program is running is called. |
|
Definition
Dynamic Memory Allocation |
|
|
Term
9.19 The _____ operator is used to dynamically allocate memory. |
|
Definition
|
|
Term
9.20 Under older compilers, if the new operator cannot allocate the amount of memory requested, it returns _____. |
|
Definition
|
|
Term
9.21 A pointer that contains the address 0 is called a(n) ____ pointer. |
|
Definition
|
|
Term
9.22 When a program is finished with a chunk of dynamically allocated memory, it should free it with the _____ operator. |
|
Definition
|
|
Term
9.23 You should only use pointers with delete that were previously used with _____. |
|
Definition
|
|
Term
9.32 The indirection * is used to get the address of a variable. |
|
Definition
|
|
Term
9.33 The pointer variables are designed to hold addresses. |
|
Definition
|
|
Term
9.34 The & symbol is called the indirection operator. |
|
Definition
|
|
Term
9.35 The & operator dereferences a pointer. |
|
Definition
|
|
Term
9.36 When the indirection operator is used with a pointer variable, you are actually working with the value the pointer is pointing to. |
|
Definition
|
|
Term
9.37 Array names cannor be dereferenced with the indirection operator. |
|
Definition
|
|
Term
9.38 When you add a value to a pointer, you are actually adding that number timesthe size of the data type referenced by the pointer. |
|
Definition
|
|
Term
9.39 The address operator is not needed to assign an address to a pointer. |
|
Definition
|
|
Term
9.40 You cannot change the addres that an array name points to. |
|
Definition
|
|
Term
9.41 Any mathethimaticals operation, , including multiplication and division, may be performed on a pointer. |
|
Definition
|
|
Term
9.42 Pointers may be compary using the relational operators. |
|
Definition
|
|
Term
9.43 When used as function parameters, reference variables are much easier to work with that pointer.s |
|
Definition
|
|
Term
9.44 The new operator dynamically alloates the memonry. |
|
Definition
|
|
Term
9.45 A pointervariable that has not been initialized is called a numm pointer. |
|
Definition
|
|
Term
9.46 The address 0 is generally considered unsuable. |
|
Definition
|
|
Term
9.47 In using a pointer with the delete operator, it is not necessary for the pointer ta have neen proviously used wth the new operator. |
|
Definition
|
|
Term
The _______ function returns true if the character argument is uppercase. |
|
Definition
|
|
Term
The _______ function returns true if the character argument is a letter of the alphabet. |
|
Definition
|
|
Term
The _______ function returns true if the character argument is a digit. |
|
Definition
|
|
Term
The _______ function returns true if the character argument is a whitespace character. |
|
Definition
|
|
Term
The ______ function returns the uppercase equivalent of its character argument. |
|
Definition
|
|
Term
The _______ function returns the lowercase equivalent of its character argument. |
|
Definition
|
|
Term
The ________ file must be included in a program that uses character testing functions. |
|
Definition
|
|
Term
The _______ function returns the length of a string. |
|
Definition
|
|
Term
To _______ two strings means to append one string to the other. |
|
Definition
|
|
Term
The ________ function concatenates two strings. |
|
Definition
|
|
Term
The ________ function copies one string to another. |
|
Definition
|
|
Term
The ________ function searches for a string inside of another one. |
|
Definition
|
|
Term
The _______ function compares two strings. |
|
Definition
|
|
Term
The ________ function copies, at most, n number of characters from one string to another. |
|
Definition
|
|
Term
The _______ function returns the value of a string converted to an integer. |
|
Definition
|
|
Term
The _______ function returns the value of a string converted to a long integer. |
|
Definition
|
|
Term
The _______ function returns the value of a string converted to a float. |
|
Definition
|
|
Term
The _______ function converts an integer to a string. |
|
Definition
|
|
Term
Character testing functions such as isupper, accept strings as arguments and test each character in the string. (T/F) |
|
Definition
|
|
Term
If toupper's argument is already uppercase, it is returned as is, with no changes. (T/F) |
|
Definition
|
|
Term
If tolowers's argument is already lowercase, it will be inadvertently converted to uppercase. (T/F) |
|
Definition
|
|
Term
The strlen function returns the size of the array containing a string. |
|
Definition
|
|
Term
If the starting address of a C-string is passed into a pointer parameter, it can be assumed that all the characters, from that address up to the byte that holds the null terminator, are part of the string. (T/F) |
|
Definition
|
|
Term
C-string handling functions accept as arguments pointers to strings (array names or pointer variables), or literal strings. (T/F) |
|
Definition
|
|
Term
The strcat function checks to make sure the first string is large enough to hold both strings before performing the concatenation. (T/F) |
|
Definition
False, no bound checking in C++ |
|
|
Term
The strcpy function will overwrite the contents of its first string argument. (T/F) |
|
Definition
|
|
Term
The strcpy function performs no bounds checking on the first argument. (T/F) |
|
Definition
|
|
Term
There is no difference between "847" and 847. (T/F) |
|
Definition
|
|
Term
13.17. The two common programming methods in practice today are _________ and _________. |
|
Definition
Procedural and Object Orientated |
|
|
Term
13.18. _________ programming is centered around functions or procedures. |
|
Definition
|
|
Term
13.19. _________ programming is centered around objects. |
|
Definition
|
|
Term
13.20. _________ is an object s ability to contain and manipulate its own data. |
|
Definition
|
|
Term
13.21. In C++ the _________ is the construct primarily used to create objects. |
|
Definition
|
|
Term
13.22. A class is very similar to a(n) _________. |
|
Definition
|
|
Term
13.23. A(n) _________ is a key word inside a class declaration that establishes a member's accessibility. |
|
Definition
|
|
Term
13.24. The default access specification of class members is _________. |
|
Definition
|
|
Term
13.25. The default access specification of a struct in C++ is _________. |
|
Definition
|
|
Term
13.26. Defining a class object is often called the _________ of a class. |
|
Definition
|
|
Term
13.27. Members of a class object may be accessed through a pointer to the object by using the _________ operator. |
|
Definition
The Arrow is the Pointer Operator --> |
|
|
Term
13.28. If you were writing the declaration of a class named Canine, what would you name the file it was stored in? _________ |
|
Definition
|
|
Term
13.29. If you were writing the external definitions of the Canine class s member functions, you would save them in a file named _________. |
|
Definition
|
|
Term
13.30. When a member function s body is written inside a class declaration, the function is _________. |
|
Definition
|
|
Term
13.31. A(n) _________ is automatically called when an object is created. |
|
Definition
|
|
Term
13.32. A(n) _________ is a member function with the same name as the class. |
|
Definition
|
|
Term
13.33. _________ are useful for performing initialization or setup routines in a class object. |
|
Definition
|
|
Term
13.34. Constructors cannot have a(n) _________ type. |
|
Definition
|
|
Term
13.35. A(n) _________ constructor is one that requires no arguments. |
|
Definition
|
|
Term
13.36. A(n) _________ is a member function that is automatically called when an object is destroyed. |
|
Definition
|
|
Term
13.37. A destructor has the same name as the class, but is preceded by a(n) _________ character. |
|
Definition
|
|
Term
13.38. Like constructors, destructors cannot have a(n) _________ type. |
|
Definition
|
|
Term
13.39. A constructor whose arguments all have default values is a(n) _________ constructor. |
|
Definition
|
|
Term
13.40. A class may have more than one constructor, as long as each has a different _________. |
|
Definition
|
|
Term
13.41. A class may only have one default _________ and one _________. |
|
Definition
constructor and destructor |
|
|
Term
13.42. A(n) _________ may be used to pass arguments to the constructors of elements in an object array. |
|
Definition
|
|
Term
13.51. T F Private members must be declared before public members. |
|
Definition
|
|
Term
13.52. T F Class members are private by default. |
|
Definition
|
|
Term
13.53. T F Members of a struct are private by default. |
|
Definition
|
|
Term
13.54. T F Classes and structures in C++ are very similar. |
|
Definition
|
|
Term
13.55. T F All private members of a class must be declared together. |
|
Definition
|
|
Term
13.56. T F All public members of a class must be declared together. |
|
Definition
|
|
Term
13.57. T F It is legal to de ne a pointer to a class object. |
|
Definition
|
|
Term
13.58. T F You can use the new operator to dynamically allocate an instance of a class. |
|
Definition
|
|
Term
13.59. T F A private member function may be called from a statement outside the class, as long as the statement is in the same program as the class declaration. |
|
Definition
|
|
Term
13.60. T F Constructors do not have to have the same name as the class. |
|
Definition
|
|
Term
13.61. T F Constructors may not have a return type. |
|
Definition
|
|
Term
13.62. T F Constructors cannot take arguments. |
|
Definition
|
|
Term
13.63. T F Destructors cannot take arguments. |
|
Definition
|
|
Term
13.64. T F Destructors may return a value. |
|
Definition
|
|
Term
13.65. T F Constructors may have default arguments. |
|
Definition
|
|
Term
13.66. T F Member functions may be overloaded. |
|
Definition
|
|
Term
13.67. T F Constructors may not be overloaded. |
|
Definition
|
|
Term
13.68. T F A class may not have a constructor with no parameter list, and a constructor whose arguments all have default values. |
|
Definition
|
|
Term
13.69. T F A class may only have one destructor. |
|
Definition
|
|
Term
13.70. T F When an array of objects is de ned, the constructor is only called for the rst element. |
|
Definition
|
|
Term
13.71. T F To nd the classes needed for an object-oriented application, you identify all of the verbs in a description of the problem domain. |
|
Definition
|
|
Term
13.72. T F A class s responsibilities are the things the class is responsible for knowing, and actions the class must perform. |
|
Definition
|
|
Term
If a member variable is declared ________, all objects of that class have access to the same variable. |
|
Definition
|
|
Term
Static member variables are defined ________ the class. |
|
Definition
|
|
Term
A(n) ________ member function cannot access any nonstatic member variables in its own class. |
|
Definition
|
|
Term
A static member function may be called _______ any instances of its class are defined. |
|
Definition
|
|
Term
A(n) ________ function is not a member of the class, but has access to the private members of the class. |
|
Definition
|
|
Term
A(n) _______ tell the compiler that a specific class will be declared later in the function. |
|
Definition
|
|
Term
________ is the default behavior when an object is assigned the value of another object of the same class. |
|
Definition
|
|
Term
A(n) ________ is a special constructor, called whenever a new object is initialized with another object's data. |
|
Definition
|
|
Term
_______ is a special built in pointer that is automatically passed as a hidden argument to all nonstatic member functions. |
|
Definition
|
|
Term
An operator may be _______ to work with a specific class. |
|
Definition
|
|
Term
When overloading the ________ operator, its function must have a dummy parameter. |
|
Definition
Postfix increment (or decrement) |
|
|
Term
Making an instance of one class a member of another class is called ________. |
|
Definition
|
|
Term
Object aggregation is useful for creating a(n) ________ relationship between two classes. |
|
Definition
|
|
Term
Static variables cannot be accessed by nonstatic member functions. t/f |
|
Definition
|
|
Term
Static member variables are defined outside their class declaration. t/f |
|
Definition
|
|
Term
A static member function may refer to nonstatic member variables of the same class, but only after an instance of the class has been defined. t/f |
|
Definition
|
|
Term
When a function is declared a friend by a class, it becomes a member of the class. t/f |
|
Definition
|
|
Term
A friend has access to the private members of the class declaring it a friend. t/f |
|
Definition
|
|
Term
an entire class may be declared a friend of another class. t/f |
|
Definition
|
|
Term
In order for a function or a class to become a friend of another class, it must be declared as such by the class granting it access. t/f |
|
Definition
|
|
Term
If a class has a pointer as a member, it's a good idea to also have a copy constructor. t/f |
|
Definition
|
|
Term
You cannot use the = operator to assign one object's values to another object, unless you overload the operator. t/f |
|
Definition
|
|
Term
If a class doesn't have a copy constructor, the compiler generates a default copy constructor for it. t/f |
|
Definition
|
|
Term
If a class has a copy constructor, and an object of that class is passed by value into a function, the function's parameter will not call its copy constructor. t/f |
|
Definition
|
|
Term
The "this" pointer is passed to static member functions. t/f |
|
Definition
|
|
Term
All functions that overload unary operators must have a dummy parameter. t/f |
|
Definition
|
|
Term
For an object to perform automatic type conversion, an operator function must be written. t/f |
|
Definition
|
|
Term
It is possible to have an instance of one class as a member of another class. t/f |
|
Definition
|
|
Term
19. A derived class inherits the __________ of its base class. |
|
Definition
|
|
Term
20. When both a base class and a derived class have constructors, the base class s constructor is called __________ (first/last). |
|
Definition
|
|
Term
21. When both a base class and a derived class have destructors, the base class s constructor is called __________ (first/last). |
|
Definition
|
|
Term
22. An overridden base class function may be called by a function in a derived class by using the __________ operator. |
|
Definition
scope resolution operator |
|
|
Term
23. When a derived class redefines a function in a base class, which version of the function do objects that are defined of the base class call? __________ |
|
Definition
|
|
Term
24. A(n) __________ member function in a base class expects to be overridden in a derived class. |
|
Definition
|
|
Term
25. __________ binding is when the compiler binds member function calls at compile time. |
|
Definition
|
|
Term
26. __________ binding is when a function call is bound at runtime. |
|
Definition
|
|
Term
27. __________ is when member functions in a class hierarchy behave differently, depending upon which object performs the call. |
|
Definition
|
|
Term
28. When a pointer to a base class is made to point to a derived class, the pointer ignores any __________ the derived class performs, unless the function is __________. |
|
Definition
|
|
Term
29. A(n) __________ class cannot be instantiated. |
|
Definition
|
|
Term
30. A(n) __________ function has no body, or definition, in the class in which it is declared. |
|
Definition
|
|
Term
31. A(n) __________ of inheritance is where one class is derived from a second class, which in turn is derived from a third class. |
|
Definition
|
|
Term
32. __________ is where a derived class has two or more base classes. |
|
Definition
|
|
Term
33. In multiple inheritance, the derived class should always __________ a function that has the same name in more than one base class. |
|
Definition
|
|
Term
38. T F The base class s access speci cation affects the way base class member functions may access base class member variables. |
|
Definition
|
|
Term
39. T F The base class s access speci cation affects the way the derived class inherits members of the base class. |
|
Definition
|
|
Term
40. T F Private members of a private base class become inaccessible to the derived class. |
|
Definition
|
|
Term
41. T F Public members of a private base class become private members of the derived class. |
|
Definition
|
|
Term
42. T F Protected members of a private base class become public members of the derived class. |
|
Definition
|
|
Term
43. T F Public members of a protected base class become private members of the derived class. |
|
Definition
|
|
Term
44. T F Private members of a protected base class become inaccessible to the derived class. |
|
Definition
|
|
Term
45. T F Protected members of a public base class become public members of the derived class. |
|
Definition
|
|
Term
46. T F The base class constructor is called after the derived class constructor. |
|
Definition
|
|
Term
47. T F The base class destructor is called after the derived class destructor. |
|
Definition
|
|
Term
48. T F It isn t possible for a base class to have more than one constructor. |
|
Definition
|
|
Term
49. T F Arguments are passed to the base class constructor by the derived class constructor. |
|
Definition
|
|
Term
50. T F A member function of a derived class may not have the same name as a member function of the base class. |
|
Definition
|
|
Term
51. T F Pointers to a base class may be assigned the address of a derived class object. |
|
Definition
|
|
Term
52. T F A base class may not be derived from another class. |
|
Definition
|
|
Term
The line containing a throw statement is known as the ________. |
|
Definition
|
|
Term
The ________ block contains code that directly or indirectly might cause an exception to be thrown. |
|
Definition
|
|
Term
The ______ block handles an exception. |
|
Definition
|
|
Term
When writing function or class templates, you use a(n) ________ to specify the generic data type. |
|
Definition
|
|
Term
The beginning of a template is marked by a(n) ______. |
|
Definition
|
|
Term
When defining objects of class templates, the ________ you wish to pass into the type parameter must be specified. |
|
Definition
|
|
Term
A(n) ______ template works with a specific data type. |
|
Definition
|
|
Term
A(n) ________ container organizes data in a sequential fashion similar to an array. |
|
Definition
|
|
Term
A(n) _______ container uses keys to rapidly access elements. |
|
Definition
|
|
Term
_______ are pointer like objects used to access data stored in a container. |
|
Definition
|
|
Term
The ________ exception is thrown when the new operator fails to allocate the requested amount of memory. |
|
Definition
|
|
Term
There can only be one catch block in a program. t/f |
|
Definition
|
|
Term
When an exception is thrown, but not caught, the program ignores the error. t/f |
|
Definition
|
|
Term
Data may be passed with an exception by storing it in members of an exception class. t/f |
|
Definition
|
|
Term
Once an exception has been thrown, it is not possible for the program to jump back to the throw point. |
|
Definition
|
|
Term
All type parameters defined in a function template must appear at least once in the function parameter list. t/f |
|
Definition
|
|
Term
The compiler creates an instance of a function template in memory as soon as it encounters the template. t/f |
|
Definition
|
|
Term
A class object passed to a function template must overload any operators used on the class object by the template. t/f |
|
Definition
|
|
Term
Only one generic type may be used with a template. t/f |
|
Definition
|
|
Term
In the function template definition, it is not necessary to use each type parameter declared in the template prefix. t/f |
|
Definition
|
|
Term
It is possible to overload two function templates. t/f |
|
Definition
|
|
Term
It is possible to overload a function template and an ordinary (nontemplate) function. t/f |
|
Definition
|
|
Term
A class template may not be derived from another class template. t/f |
|
Definition
|
|
Term
A class template may not be used as a base class. t/f |
|
Definition
|
|
Term
Specialized templates work with a specific data type. t/f |
|
Definition
|
|
Term
When defining an iterator from the STL, the compiler automatically creates the right kind, depending upon the container it is to be used with. t/f |
|
Definition
|
|
Term
STL algorithms are implemented as function templates. t/f |
|
Definition
|
|