#include <stdio.h>
void reverseArray(){
int arr1[] = {11, 12, 13, 14, 15};
int len = sizeof(arr1)/sizeof(arr1[0]);
printf("Original: \n");
for (int i = 0; i < len; i++) {
printf("%d ", arr1[i]);
}
printf("\n");
printf("Reversed: \n");
for (int i = len-1; i >= 0; i--) {
printf("%d ", arr1[i]);
}
}
int main()
{
reverseArray();
return 0;
}
Comments
Leave a comment