C++, Programmimg Languages

ARRAY

Array is a collection of homogeneous or same type members. For example, array can be of integer, float or even structure type. It is created by simply specifying its size as subscript along with variable name. For example, int a[5];
Memory allocated to an array is equal to the memory taken by its base type multiplied by the number of elements. Let us consider the memory allocated to a[5]
a3
The array elements are indexed starting from 0 to n-1, where n is the size of array. Each element can be accessed using the index number.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s