AnkitWebLogic

C - Reverse the array list.

Q. WAP to input 10 numbers in array and reverse the array list. 1

void main()
{
    int a[10], i;
    clrscr();
    printf("Enter 10 numbers: ");
    for(i=0;i<=9;i++)
    {
        scanf("%d",&a[i]);
    }
    printf("After Reverse, List is:\n");
    for(i=9;i>=0;i--)
    {
        printf(" %d",a[i]);
    }
    getch();
}
Enter 10 Numbers: 1 2 3 4 5 6 7 8 9 10
10 9 8 7 6 5 4 3 2 1