Lecture 11 Objectives


At the end of today's class you should

KNOW:

BE ABLE TO:

Sample Exam Question:

  1. In C, there is no way to pass an array by value. Give an example of a function in which this restriction is a liability (in other words, give an example of a function for which it would be preferable to be able to pass the array by value).
  2. (Read section 7.5 before trying this question.) Modify your function from problem 1 using the const qualifier so that the array gets the protection afforded by call-by-value.