Topics for Examination II
Data Structures
March 6, 2001
-
Read a line from the keyboard.
-
Write a function that would fill an array with N random values.
-
Declare an array.
-
Declare a file variable.
-
Open a file for output.
-
Close a file.
-
Write N values from an array to a file.
-
Write a generic function that would sort the first N elements
of an array using the bubble sort.
-
Be able to give the results of each pass of a bubble sort.
-
Write a generic function that would sort the first N elements
of an array using the insert sort.
-
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.
-
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.
-
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.
-
Write a C++ header file as specified by the instructor.
-
Write the implementation of a C++ header file.
-
Write a stack class declaration.
-
Define a stack.
-
Draw a stack after a series of stack operations.