Introduction: Arrays are the sequential data structure in which elements are stored in a continuous manner. We can create arrays of different data types like int (stores integers like 5,7,2,9,10), char(stores Characters like ‘a’, ‘o’, ‘i’), double & float (which are used to store floating i.e decimal values). We can…