array reversal

Run Settings
LanguageC
Language Version
Run Command
#include <stdio.h> #include <stdlib.h> int main() { int num, *arr, i; scanf("%d", &num); arr = (int*) malloc(num * sizeof(int)); for(i = 0; i < num; i++) { scanf("%d", arr + i); } for(i = num-1; i >=0; i--) printf("%d\t",*(arr + i)); }
Editor Settings
Theme
Key bindings
Full width
Lines