An array is a one of the data structure in C++, that can store a fixed size sequential collection of elements of same data type. Arrays are of different types :
A two-dimensional array is the simplest of multidimensional arrays. However, C++ allows arrays of more than two dimension.
The simplest form of an array is a singel dimensional array. The array is given a name and its elements are referred to by their subscripts or indices. C++ arrays index numbering starts with 0. The general form of an array declaration is as shown below :
type array-name[size];
|
A two-dimensinal array is an array in which each element is itself an array. For instance, an array a[m][n] in an M by N table with M rows and N columns containing M x N elements.
To read or process a 2-D array, you need to use nested loops. one loop processes the rows and another the columns.
|
In C++, the one-dimensional array of characters are called strings, which is terminated by a null character ‘\0’.
|
It's a special area where you can find special questions and answers for CSE students or IT professionals. Also, In this section, we try to explain a topic in a very deep way.