ARRAY
ARRAY
23BEIS141
Rakshita Raju Basarkod 23BEIS142
Rakshita S 23BEIS143
Rakshitha Prasad 23BEIS144
Rakshitha T J 23BEIS145
Section : D
Topic : ARRAYS
GARDEN
UNIVERSITY
CITY
EMPHASIS ON LIFE
ARRAYS
Arrays are data structures used to store collections of
items, all of the same type, under a single variable
name. They provide a way to organize and access
related data elements more efficiently.
GARDEN
UNIVERSITY
CITY
EMPHASIS ON LIFE
ARRAYS
WHY WE NEED TO USE ARRAY TYPE?
Consider the following issue,
We have a list of 500 students marks of an integer type. If using the basic data
type (int), We will declare something like the following ……
Int studMark0, same studmark1, ….studmark499
This will reserve 500 contiguous memory locations for storing the students marks
GARDEN
UNIVERSITY
CITY
EMPHASIS ON LIFE
ARRAYS
EXAMPLE
INITIALIZATION
In C programming, you can initialize
arrays in a few diverse ways:
1. Static Initialization
2. Loop Initialization
DECLARATION
In C programming, you can declare
arrays using the following syntax:
1. Declaring an Array of Integers:
Example: Example:
Multi-Dimensional Array