count the array elements


Write a C Program to count the array elements



#include<conio.h>
#include<stdio.h>
void main()
{
int a[10],i,c=0;
clrscr();
printf("enter array elements=");
for(i=0;i<10;i++)
{
scanf("%d",&a[i]);
}
for(i=0;i<10;i++)
{
c++;
}
printf("counting elements of an array is:%d",c);
getch();
}



Program Coded by: Ashish Garg, Patiala (India)

Labels