Lab 14: Prelab Questions

Write out your answers for these questions on a separate piece of paper.


Written Questions

Question #1: The values in a vector are stored in ____________ memory locations.

Question #2: The values in a list are stored in ____________ memory locations.

Question #3: Draw the graphs of constant time and linear time operations.

Question #4: The ____________ is a special node at the beginning of a list.

Question #5: ____________ are used to link the nodes of a list together.

Programming Exercises

Code #1: Write declarations for aList and aVec, a list and a vector of doubles, respectively.

Code #2: Write expressions that evaluate to the lengths of aList and aVec.

Code #3: Write statements that add the value 3.14159 to the end of aList and aVec.

Code #4: Write the statements that add the value 2.7183 to the front of aList and aVec.

Code #5: Write the statements that remove the last values of aList and aVec.


Lab Home Page | Lab Exercise | Homework Projects
© 2003 by Prentice Hall. All rights reserved.
Report all errors to Jeremy D. Frens.