You are on page 1of 1

Assignment 10: Arrays practice & 2D arrays

1. Two arrays A and B are given as:


A = {1,2,3,4,5,6,7}
B = {11,33,66,77,99,45,22}
Write a program to store the sum of given two arrays index-wise into a new array and print it.

2. A binary array arr = {1,1,1,0,1,0,1,0,0,1,1,1,0,1,0,1,1} is given, write a program to print the


number of zeroes and ones present in the array.

3. Find the greatest element in array arr = {-10,-20,-11,-2,-5}

4. Write a program to fill a 2D array of size 4x5 with multiples of 3.

5. Write a program to right rotate given array by one position


Arr = {1,5,2,7,4,9,22,3}

4U Academy

You might also like