Difference between revisions of "CSC270 Final Exam 2016"

From dftwiki3
Jump to: navigation, search
Line 23: Line 23:
 
=Problem 1=
 
=Problem 1=
 
<br />
 
<br />
The program below implements a list of pairs of ints.  A linked list is first created using ints from an array, and then the list is displayed, highlighting the pairs.
+
The program below implements a linked-list of pairs of ints.  Study it, run it, play with it, and make sure you are comfortable with the code.
 
<br />
 
<br />
 
::<source lang="C" highlight="40,41">
 
::<source lang="C" highlight="40,41">
Line 82: Line 82:
 
</source>
 
</source>
 
<br />
 
<br />
The program above creates a linked list and displays it.  The list list is composed of numbers found in an array of '''ints'''.  The program can use 3 different arrays of ints, defined at '''table1''', '''table2''', and '''table3'''.  In its implementation above, it uses table1.  If you wanted to use table2 instead, you could change the highlighted lines as illustrated below:
+
As you should have observed, the program creates a linked list and then displays it.  The list list is composed of numbers originally found in an array of '''ints'''.  The program can use 3 different arrays of ints, defined at '''table1''', '''table2''', and '''table3'''.  In its implementation above, it uses table1.  If you wanted to use table2 instead, you could change the highlighted lines as illustrated below:
 
<br />
 
<br />
 
::<source lang="C">
 
::<source lang="C">
Line 89: Line 89:
 
</source>
 
</source>
 
<br />
 
<br />
* Compile and run the program, and verify that it displays the list of pairs.  Make sure you understand how it works.
+
* (I will test your program with all 3 arrays.)
 +
* Compile and run the program for all 3 arrays, and verify that it correctly displays the list of pairs.   
 
<br />
 
<br />
 
==Your Assignment==
 
==Your Assignment==

Revision as of 12:47, 25 April 2016

--D. Thiebaut (talk) 10:09, 16 April 2016 (EDT)


...