#include <stdio.h> int main() { int arr[] = {1, 2, 3, 4, 5}; int i; int len = sizeof(arr) / sizeof(arr[0]); int mid = len / 2; for (i = 0; i < mid; i++) { int tmp = arr[i]; arr[i] = arr[4 - i]; arr[4 - i] = tmp; } for (i = 0; i < len; i++) printf("%d/n", arr[i]); return 0; }
原创文章,作者:kepupublish,如若转载,请注明出处:https://blog.ytso.com/275976.html