Array-1
Array-1
Exploring Array
How to store math marks for all Students?
• Suppose we have 10 students.
Assignment 2
Find out the output of the following program.
#include<stdio.h>
int main(){
int a[8]={5,2,3,1,4,5,2},i;
for(i=0;i<8;i++){
if(a[i]%2==1)
printf(“%d ”,i);
}
return 0;
}
Array Dimension
One dimensional array consists of only one dimension(row). E.g. int a[10];
• Array-4 (Sorting)