You are encouraged to work with a partner.
Work in a subdirectory called initslab10, where inits are your initials. Once you have completed the C programs and made script files to demonstrate your testing of each, remove any extraneous files so that your directory contains just the .c files and the script files. Then make a tarball of that directory and send it to me as an attachment to the email whose subject line should be CS33 Lab10. Send the email to cfk@cs.swarthmore.edu.
Each program must follow these following guidelines:
int *max(int *a, int *b); int *max3(int *a, int *b, int *c);(We will discuss something very similar in class on Monday or Wednesday.)
The max function has two pointers to integers as parameters and returns the pointer that points to the larger integer.
The max3 function has three pointers to integers as parameters and returns the pointer that points to the largest integer. The max3 function should make use of the max function in computing its answer.
In main, ask the user to enter three values, then increment the largest value, and print all three values back to the user.
Here is sample output (underlined text is text entered by the user):
Enter integer values for x, y, and z: 3 8 5 The values after incrementing the largest value are: x = 3, y = 9, z = 5
Here is a test run of my solution. The program prompted with the question mark. I entered the number after the question mark (pretty good class). My program output the histogram.
void populateArray(int *array, int size, int highVal);
Boolean isSorted(int *array, int size);
void swap(int *a, int *b); void selectionSort(int *array, int size);
Note: As of 1 Oct, the final exam for CS33 has been scheduled by the registrar for Friday 12/17/2009, 9:00am-12:00pm in SC240. Plan to attend.