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 for loop to traverse the array.

  • Use an if statement to check and update the current maximum value.

Question 02

Write a C program that calculates the sum of all numbers between 1 and 100 (inclusive) that are divisible by 5.

Question 03

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 04

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 05

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 06

Write a C program that finds the second largest number in an array of integers.

Last modified: Saturday, 23 November 2024, 6:03 PM