I'm pretty new to arrays, and I'm having a slight problem printing one of my arrays in reverse:
Code:
#include <stdio.h>
int main(void)
{ int i;
int firstarray[7] = {4, 9, -3, 0, 2, 7, 51};
int secondarray[5] = {34, -6, 5, 15, -21};
printf("The First Array is: ");
{
for(i=0;i<7;i++)
printf("%d ",firstarray[i]);}
printf("\n");
printf("The Second Array is: ");
{
for(i=0;i<5;i++)
printf("%d ", secondarray[i]);}
printf("\n");
printf("The First Array in reverse order is: ");
{
for(i=0;i>=7;i--)
printf("%d ", firstarray[i]);
printf("\n");
}
}
The array in reverse doesnt print anything at all. Any idea what I'm missing?