Assessment Tool

Lecture 13:  Pointer Parameters

Content Tested:  Pointers

Lecture Content:

Goals:

Assessment Technique:  Application Cards

Purpose:

To allow instructors to find out if students understand the need and use for pointer parameters.

Activity:



We have just seen the syntax and purpose for using pointer parameters.  Name three functions for which you would use pointer parameters.  For this activity, please describe the following:  1) function name, 2) function parameters, 3) function description, 4) return values.  Please indicate which parameters are pointer parameters.  You do not need to write C code for this activity -- just descriptions of the functions.

You may want to think about previous homework assignments.  Where would you use pointer parameters?


Possible Solution:

function:  sortThree
function parameters:  3 pointers to ints (*a, *b, *c)
function description:  This function takes three pointers to ints and sorts them so that a points to the smallest value, b points to the middle value, and c points to the largest value.
return values:  None
 

Possible Uses of Activity: