EmbLogic's Blog

Program To Print Array index with its Element

#include<stdio.h>
int main()
{
int a[100],i,n;
printf(“enter element of array :\t”);
scanf(“%d”,&n);
for(i=0;i<n;i++)
{
scanf(“%d”,&a[i]);
}
for(i=0;i<n;i++)
{
printf(“a[%d]=%d\n”,i,a[i]);
}
}

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>