Define array. How to declare an array in C++?

Arrays are used to store data items or values which of similar data types. Eg. For storing records of 20 students in a class we can declare an array. Values of array are stored in continuous locations in memory. In Array all the elements of the array share the same name.

Syntax to declare an array is:

Datatype array_name [size];

Eg: int student [20];

In above example an array of integer type has been declared. Its size is 20 means that it can store 20 integer values.

More Questions

Leave a Reply

Word Verfication * Time limit is exhausted. Please reload CAPTCHA.