Name: ________________________________ Section: _________________

Honor Code Acknowledgment: ___________________


Random Quiz # 6

CPS 100e, Fall 1995

Due: October 31 (Very Scary)


Problem 1: In a fix (2 points)

What is the value of the following postfix expression?
            8 5 + 3 2 * - 7 *

Problem 2: Spivey's Corner (2 points)

Describe what the procedure Chop shown below does to its list parameter. You can do this by showing an example list before and after and by generalizing to what is done to any list.
void Chop(ListNode * & list)
{
    if (list != NULL)
    {
        Chop(list->next);
        if (list->info % 2 == 0)
        {
            list = list->next;
        }        
    }
}