#include <stdio.h>
#include <stdlib.h>

int main() {
    int *arr,*ar,i,n=5;
    
    arr = (int*)malloc(n*(sizeof(int)));
    ar = (int*)malloc(n*(sizeof(int)));
    
    for(i=0;i<n;i++){
        scanf("%d",arr+i);
    }
    
    for(i=0;i<n;i++){
        ar[i]=arr[n-i-1];
    }

    for(i=0;i<n;i++){
        printf("%d ",*(ar+i));
    }
    
    return 0;
}

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: