Hello,
I'm trying to figure out to to print an array in reverse, but I'm hiving some troube with the for loop, I think. I might be somethng else, but I'm not sure. Can someone tell me what I've done wrong?
Thanks,
Vireyda
(Parital code only)
Code:
#include <stdio.h>
void Fill(int B[], int &num);
void Dump(int C[], int num);
void Reverse(int D[], int num);
main()
{
int Array[10], n=0;
Fill(Array, n);
Dump(Array,n);
Reverse(Array, n);
}
void Reverse(int D[], int num)
{
int i;
printf("The elements listed in reverse order are:\n");
for (i=num; i<0; --i)
printf("\t%d\n", D[i]);
}