Monday, 10 May 2021

Introduction to arrays in C

when we work with large number of data values we need that many number of different variables. As the number of variables increases, the complexity of the program also increases and so the programmers get confused with the variable names. There may be situations where we need to work with a large number of similar data values. To make this work easier, C programming language provides a concept call " Array".


 

Definition of array:

An array is a special type of variable used to store multiple values of same data type at a time. (OR)

An array is a collection of similar data items stored in continuous memory locations with single name.

C provides different types of arrays 

1. One dimensional array

2. Two dimensional array

3. Multidimensional arrays

Arrays are convenient to work with similar types of data. The only thing is you need to declare and initialize them before use.

The array index or subscript is used to store and access values in array.


0 comments:

Post a Comment

Note: only a member of this blog may post a comment.

Find Us On Facebook

Computer Basics

More

C Programming

More

Java Tutorial

More

Data Structures

More

MS Office

More

Database Management

More
Top