Creating an Array

In this chapter, you will see the use of arrays in C++.

Introduction

An array is a collection of elements of the same data type a the single name. Let’s see how we can declare and initialize an array in C++.

Array declaration

The general syntax for declaring an array is given below:

Get hands-on with 1300+ tech skills courses.