Array: One dimensional ArrayAn array is a container object that holds a fixed number of values of a single type. Thelength of an array is established when the array is created.…