What does the following code snippet demonstrate? #include…
What does the following code snippet demonstrate? #include void function(int *arr, int size) { int temp; for (int i = 0; i < size / 2; i++) { temp = arr[i]; arr[i] = arr[size - 1 - i]; arr[size - 1 - i] = temp; } } int main() { int arr[] = {1, 2, 3, 4, 5}; function(arr, 5); for (int i = 0; i < 5; i++) { printf("%d ", arr[i]); } printf("\n"); return 0; }
Read Details