An extensive study involving three test groups over a period of three
different years was performed to determine differences between compreh
ension of recursive and iterative code constructs. This study involved
computer science students enrolled in six different data structure cl
asses using PASCAL and obtained 275 responses, which were statisticall
y analyzed. Using a chi(2) test, one task - searching a linked list fo
r a given value - showed a statistically significant (p = 0.006) diffe
rence in comprehension favoring recursion. Another task - making a cop
y of a linked list - favored iteration, but not with statistical signi
ficance. Among responses with correct comprehension, a comparison of m
eans test was performed on the comprehension times among the latter tw
o groups in the study. There was a faster rate of comprehension of the
recursive code for both of the tasks (p = 0.096 for the search and p
= 0.045 for the copy). A two-way analysis of variance suggested a tend
ency toward an interaction effect between task and construct in terms
of comprehension time.