Professional Documents
Culture Documents
Array: (Problem Solving of C')
Array: (Problem Solving of C')
Array variable can store more than one value at a time where other
variables can store one value at a time.
Int a=10
Declaration of an array
The declaration of an array tells the compiler that the data type the
name of a array and size of a array; For each element which occupy
memory stage.
After declaring the elements of an array the subscript ( a{[0]…. ) always
starts from 0, which is known as lower bound and upper value is known as
upper bound and last subscript value is one less than the size of array.
Syntax of the array
Int a=[20],i;
For(i=0;i<20;i++)
{
Scanf(“%d”,&a);
}
*/First for loop is used to declare the value of array .*/
For(i=0;i<20;i++);
{
Printf(“%d”,&a[i]);
}
*/Second for is used to operate the value of array*/
Types of array
Types of array
1. one dimensional array
2.two dimensional array
3. multidimensional array
One dimensional array
Thank you
Submitted to:-
Assistance Professor (Ashwani )