Swapping 2 arrays in C
问题 I need to swap the values of 2 arrays in a function. The problem is I can change anything in the main, just the function itself. It should recive 2 integer arrays, and swap those. The problem is, that I don't know the size of the arrays, and for my understading they can even be in diffrent sizes. Trying this code: int main() { int size = 4; //Please notice that I'm using this only to print the array int a[] = {1,2,3,4}; int b[] = {5,6,7,8}; printArr(a,"a",size); printArr(b,"b",size);