Question 01
Write a C program that finds the maximum value in a predefined array of integers. Let the array be equal to {10, 3, 45, 21, 7, 88, 32, 15}.
-
Use a
forloop to traverse the array. -
Use an
ifstatement to check and update the current maximum value.
Question 02
Write a C program that copies an array of integers into another array. Your program should have an original array and a copy array. Make the array equal to {0, 7, 8, 10, -4, 5, 6, 9, 11, -32}.
Question 03
Write a C program that copies an array of integers into another array in reverse order. Your program should have an original array and a reversed array. Make the array equal to {0, 7, 8, 10, -4, 5, 6, 9, 11, -32}.
Question 04
Write a C program that reverses an array of integers in place i.e. you should not create another array. Make the array equal to {0, 7, 8, 10, -4, 5, 6, 9, 11, -32}.
Question 05
Write a C program that finds the second largest number in an array of integers.