- 16.16.1: What is the difference between a try block and a catch block?
- 16.16.2: What happens if an exception is thrown, but not caught?
- 16.16.3: If multiple exceptions can be thrown, how does the catch block know...
- 16.16.4: After the catch block has handled the exception, where does program...
- 16.16.5: How can an exception pass data back to the exception handler?
- 16.16.6: When does the compiler actually generate code for a function template?
- 16.16.7: The following function accepts an int argument and returns half of ...
- 16.16.8: What must you be sure of when passing a class object to a function ...
- 16.16.9: What is the best method for writing a function template?
- 16.16.11: As the following Rectangle class is written, the width and length m...
- 16.1: What is a throw point?
- 16.2: What is an exception handler?
- 16.3: Explain the difference between a try block and a catch block.
- 16.4: What happens if an exception is thrown, but not caught?
- 16.5: What is unwinding the stack?
- 16.6: What happens if an exception is thrown by a classs member function?
- 16.7: How do you prevent a program from halting when the new operator fai...
- 16.8: Why is it more convenient to write a function template than a serie...
- 16.9: Why must you be careful when writing a function template that uses ...
- 16.10: What is a container? What is an iterator?
- 16.11: What two types of containers does the STL provide?
- 16.12: What STL algorithm randomly shuffles the elements in a container?
- 16.13: The line containing a throw statement is known as the __________.
- 16.14: The __________ block contains code that directly or indirectly migh...
- 16.15: The __________ block handles an exception.
- 16.16: When writing function or class templates, you use a(n) __________ t...
- 16.17: The beginning of a template is marked by a(n) __________.
- 16.18: When defining objects of class templates, the __________ you wish t...
- 16.19: A(n) __________ template works with a specific data type.
- 16.20: A(n) __________ container organizes data in a sequential fashion si...
- 16.21: A(n) __________ container uses keys to rapidly access elements.
- 16.22: __________ are pointer-like objects used to access data stored in a...
- 16.23: The __________ exception is thrown when the new operator fails to a...
- 16.24: Write a function that searches a numeric array for a specified valu...
- 16.25: Write a function that dynamically allocates a block of memory and r...
- 16.26: Make the function you wrote in Question 24 a template.
- 16.27: Write a template for a function that displays the contents of an ar...
- 16.28: A program has the following definition statements: vector numbers; ...
- 16.29: Write a statement that performs the STL binary_search algorithm on ...
- 16.30: A program has the following definition: vector numbers; The same pr...
- 16.31: T F There can be only one catch block in a program.
- 16.32: T F When an exception is thrown, but not caught, the program ignore...
- 16.33: T F Data may be passed with an exception by storing it in members o...
- 16.34: T F Once an exception has been thrown, it is not possible for the p...
- 16.35: T F All type parameters defined in a function template must appear ...
- 16.36: T F The compiler creates an instance of a function template in memo...
- 16.37: T F A class object passed to a function template must overload any ...
- 16.38: T F Only one generic type may be used with a template.
- 16.39: T F In the function template definition, it is not necessary to use...
- 16.40: T F It is possible to overload two function templates.
- 16.41: T F It is possible to overload a function template and an ordinary ...
- 16.42: T F A class template may not be derived from another class template.
- 16.43: T F A class template may not be used as a base class.
- 16.44: T F Specialized templates work with a specific data type.
- 16.45: T F When defining an iterator from the STL, the compiler automatica...
- 16.46: T F STL algorithms are implemented as function templates.
- 16.47: Each of the following declarations or code segments has errors. Loc...
- 16.48: Each of the following declarations or code segments has errors. Loc...
- 16.49: Each of the following declarations or code segments has errors. Loc...
- 16.50: Each of the following declarations or code segments has errors. Loc...
- 16.51: Each of the following declarations or code segments has errors. Loc...
- 16.52: Assume the following definition appears in a program that uses the ...
- 16.53: Assume the following statement appears in a program that has define...
Solutions for Chapter 16: Exceptions, Templates, and the Standard Template Library (STL)
Full solutions for Starting Out with C++ from Control Structures to Objects | 8th Edition
Solutions for Chapter 16: Exceptions, Templates, and the Standard Template Library (STL)Get Full Solutions
The gaseous portion of a planet; the planet’s envelope of air. One of the traditional subdivisions of Earth’s physical environment.
A theory that relates the formation of precipitation to supercooled clouds, freezing nuclei, and the different saturation levels of ice and liquid water.
Very small galaxies, usually elliptical and lacking spiral arms.
The incorporation and transportation of material by a mobile agent, such as water, wind, or ice.
A pyramid-like peak formed by glacial action in three or more cirques surrounding a mountain summit.
A very large, thick mass of glacial ice flowing outward in all directions from one or more accumulation centers.
The movement of water particles in straight-line paths that are parallel to the channel. The water particles move downstream without mixing.
Tunnel in hardened lava that acts as a horizontal conduit for lava flowing from a volcanic vent. Lava tubes allow fluid lavas to advance great distances.
Mean solar day
The average time between two passages of the Sun across the local celestial meridian.
All discovered and undiscovered deposits of a useful mineral that can be extracted now or at some time in the future.
Pelagic organisms that can move independently of ocean currents by swimming or other means of propulsion.
Atoms combine in order that each may have the electron arrangement of a noble gas; that is, the outer energy level contains eight neutrons.
Already identified deposits from which minerals can be extracted profitably.
An angular distance measured eastward along the celestial equator from the vernal equinox. Used with declination in a coordinate system to describe the position of celestial bodies.
An isolated volcanic peak that rises at least 1,000 meters (3,000 feet) above the deepocean floor.
A time period based on the revolution of the Moon around Earth with respect to the stars.
A system of streams in which nearly parallel tributaries occupy valleys cut in folded strata.
The boundary between the troposphere and the stratosphere.