Description
Objectives:
-
Learn more about pointers and arrays
Description:
-
Modify your functions from the pre-lab 4: createIntArray, getArraySize, and freeArray.
-
In createIntArray function, create an array of integers where 1 ≤ array[i] ≤ 20, using rand function.
-
Store maximum value of the array at “array[-1]”, store the size of the array at “array[-2]”, and store the elements starting from “array[0]”.
After updating your createIntArray(), your array should look like below:
Note:
-
If your code does not compile with –Wall and –Werror, you will receive a zero for this assignment.
-
You need to finish at least three peer reviews within three days of this lab. Otherwise, you will get a 20% penalty.
-
You will lose points if you don’t have enough comments.
2