Array Program
Array Program
Array Program
int main()
a
{
int i;
int a[5]={'a','b',12,13,14};
for(i=0;i<5;i++)
a b 12 13 14
1000 1002 1004 1006 1008
{
printf("Printing element %d th of Array:",i);
if(i==0 || i==1)
{
a ,(a+1) ,(a+2),(a+3),(a+4)
printf("%c\n",a[i]);
} *a=*(1000)=a[0]
else
{
printf("%d\n",a[i]);
}
}
printf("\n\nPrinting continuous Address space of array a:\n");
printf("%u\n",a);
printf("%u\n",a+1);
printf("%u\n",a+2);
printf("%u\n",a+3);
printf("%u\n",a+4);
getch();
return(0);
}
/*
Output: