You must assign the grades for a programming class. The class is studying recursion, and students have

Question:

You must assign the grades for a programming class. The class is studying recursion, and students have been given this simple assignment: Write a recursive function SumSquares that takes a pointer to a linked list of integer elements and returns the sum of the squares of the elements.

Example:

image text in transcribed

SumSquares(listPtr) yields (5 * 5) + (2 * 2) + (3 * 3) + (1 * 1)
= 39 Assume that the list is not empty.
You have received quite a variety of solutions. Grade the functions that follow, marking errors where you see them.

image text in transcribed

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

C++ Plus Data Structures

ISBN: 9781284089189

6th Edition

Authors: Nell Dale, Chip Weems, Tim Richards

Question Posted: