120. Understanding arrays.
#include<stdio.h>
//int
i,a[5]={1,2,3,4,5};
//int
a[]={1,2,3,4,5};
int
i,d,a[5];
void
main()
{
printf("%d\n",d=sizeof(a)/sizeof(a[0]));
for(i=0;i<d;i++)
printf("%d ",a[i]);
printf("\n");
for(i=d-1;i>=0;i--)
printf("%d ",a[i]);
printf("\n");
}
Comments
Post a Comment