#include <stdio.h>
 
int main() {
  int array[10], n=10, c, t, end;
 
  //scanf("%d", &n);
  end = n - 1;
 
  for (c = 0; c < n; c++) {
    scanf("%1d", &array[c]);
  }
 
  for (c = 0; c < n/2; c++) { // 5 
    t          = array[c];
    array[c]   = array[end];
    array[end] = t;
 
    end--;
  }
 
  printf("Reversed array elements are:\n");
 
  for (c = 0; c < n; c++) {
    printf("%d", array[c]);
  }
 
  return 0;
}

Embed on website

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