Session 6: Week 11/12: <i>More Recursion</i>




Document: Software Engineering 1: Course Notes

next Hints
up Term 2: Weeks 11-20
previous Term 2: Weeks 11-20

Session 6: Week 11/12: More Recursion

This exercise is divided into 2 parts. For each part your report should have separate sections labelled Plan, Coding and Testing. There should be a single overall Conclusion section.

  1. Enter the file HCF.C, shown on page 24 of Illustrating C. Add a definition of a suitable main() function. Then compile, test, and debug the completed program.

  2. Modify the function reverse_print_array(), developed in step 2 of Laboratory Session 5, so that it uses recursion rather than a for statement to achieve the required repetition. Compile, test, and debug the completed program.





McMullin@ugmail.eeng.dcu.ie
Wed Mar 15 10:20:49 GMT 1995