Question: i need exercise 1, exercise 2, and exercise 3 answered in c language Exercise 1 Create and initialize an int array with the value 0
Exercise 1 Create and initialize an int array with the value 0 (e.g., int my Array[SIZE] = {0}) where SIZE is a preprocessor directive of value 5. Using a loop, ask a user to enter the values of their Lab grades. Using a second loop, compute the average of the grades entered. Finally, display the character value that is equivalent to the average grade, i.e., for an average of 94.8 display A, for an average of 83.4 display B, etc. Exercise 2 Create and initialize an int array with the values 1,2,3,4,5. Print the values in the array along with the address of each one of the elements Note: For printing the address use: %d (for decimal values) or %x (for hexadecimal values). What do you notice when you print the addresses of the elements of the array in decimal? Exercise 3 Create and initialize an int array with the values 1,2,3,4,5. Pass array to myFunction along with its SIZE. Inside myFunction modify the first and the last elements of the array, Print the contents of the array from within myFunction. Do the same from within main after the function call to myFunction
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
