Topics for Examination II
Data Structures
March 6, 2001

  1. Read a line from the keyboard.
  2. Write a function that would fill an array with N random values.
  3. Declare an array.
  4. Declare a file variable.
  5. Open a file for output.
  6. Close a file.
  7. Write N values from an array to a file.
  8. Write a generic function that would sort the first N elements of an array using the bubble sort.
  9. Be able to give the results of each pass of a bubble sort.
  10. Write a generic function that would sort the first N elements of an array using the insert sort.
  11. Write a procedure that would obtain from the user the name of an input file, the name of an output file, and the number of elements to be processed.
  12. Write a procedure that would read N numbers from an input file into an array.  The parameters of the procedure are the filename, the array, and the number.
  13. Write a procedure that would write N numbers from an array to an output file, with 10 numbers per line.  The parameters of the procedure are the filename, the array, and the number.
  14. Write a C++ header file as specified by the instructor.
  15. Write the implementation of a C++ header file.
  16. Write a stack class declaration.
  17. Define a stack.
  18. Draw a stack after a series of stack operations.