将数组A中的内容和数组B中的内容进行交换。

1、解决方案 设计一个循环,对两个数组同时依次遍历,每变一次都执行交换操作,这样遍历结束就完成了数组的交换。 2、具体的交换方法的实现 void exchangeArray(int max, int* a, int* b)//exchange the two same size arrays, num is the size { //交换的实现 int temp = 0;
相关文章
相关标签/搜索