Com S 541 -- Programming Languages I Feb. 17, 1993 HOMEWORK 7: Parameters (CP, Chapter 5) Due: February 19, 1993 (extra credit due Feb. 24) Do ONE of the following exercises: 1. All parameters in C are passed by value. (Really, this is the truth.) But it seems that arrays in C are passed as variable parameters. For example, the function void swap (int a[], i, j) { int temp; temp = a[i]; /* this assigns a[i] to temp */ a[i] = a[j]; a[j] = temp; } Definitely swaps two elements of an array (provided i and j are legal indices of the array). So this seems just like VAR parameters in Pascal. Explain this apparent paradox using the terminology and concepts discussed by Watt. (That is, don't just quote the C reference manual.) 2. Do problem 5.10 (about parameter passing in Ada). EXTRA CREDIT Do one or more of problems 5.3, 5.4, 5.5, or 5.11.