1. ARRAYS:-
an arrays is a sequence of data items of
homogenus.
value(same tipe)
arrays have two type.
One dimenstional array.
Two dimensional arrays.
an aray that have one subscript /index value to
slect an element is called “one dimenstional
array”.
decleration of ODA…
SYNTAX:- DATA TYPE_ARRAY NAME (SIZE);
int age {5};
the starting base address of element of the array is
known as the base address of that elements or
arrays.
INITILLIZATION OF ONE_DIMENSTIONAL ARRAYS:-
2. int age [5 ]= {10,20,30,40,50};
int age [ ]= 10,20,30,40,50};
Accing array element:-
scanf(“%d,&age[2]”);
PROGRAM:- write a program to find the marks of n
student using (ODA) ARRAY…?
#include <stdio.h>
#include<conio.h>
main ()
{
int marks {10},I,n,sum=0;
printf(“enter #of std”);
scanf(“%d”&n);
for(I=0;i<n;i++);
printf(“enter marks of std %d”,i+1);
scanf(“%d”,marks [i]);