COSC 2436 - Programming Fundamentals III Data Structures
Bob Comer, Professor of Computer Studies


Example Programs
Chapter 10 - Recursion, Algorithm Analysis and Standard Algorithms

 

Description

Program

Example of a recursive function to print the contents of an array. The base case is when the array size is 0 (does nothing). The recursive case is when the array size is larger than 0.

print_list_recur.cpp

Example of a recursive function to print the contents of an array in reverse order. The base case is when the array size is 0 (does nothing). The recursive case is when the array size is larger than 0.

print_list_recur_rev.cpp

 


Return to Programming Fundamentals III Home Page

Copyright: © 2015 by the Austin Community College
Department of Computer Studies. All rights reserved.
Comments to:
Bob Comer
Last updated: May 5, 2015