Arrays
INTRODUCTION TO ARRAYS
So, What is an array?
Have you ever studied about data types?
First of all, I will tell about data types in any programming language.
Data type of a value represents that what type of data a value can have. For ex - integers, float, characters etc.
Arrays :
Arrays are the collection of homogeneous (same type of) type of data which are stored at contiguous (together in sequence) memory location. For example - String is an array of characters.
There are two types of arrays :
1. Single Dimensional Array : Single dimensional array are used to represent and store data in linear form.
Syntax:
<data-type> <name>[size];
Declaration of 1-D array of integer type of name "Number" having size 5 & program to print array in C.
This figure illustrates you -
This figure illustrates you -
Post a Comment