Array in C++
☰Fullscreen
Table of Content:
- Assignment 1:
Question 1: Write a C++ program to perform the following operations on an array:
Declare and initialize an array of 5 integers.
Access and print each element using a loop.
Modify the third element of the array. Print the modified array.
- Assignment 2:
Question 2: Write a C++ program to:
Declare and initialize an array of 10 integers.
Calculate and print the sum of all elements.
Calculate and print the average of all elements.
- Assignment 3:
Question 3: Write a C++ program to:
Declare and initialize an array of 5 integers.
Reverse the elements of the array.
Print the reversed array.
- Assignment 4: C++ Program: Array of 10 Integers (Sum and Average)