Question: Write a C function called randswap, which takes two arrays of void pointers as parameters. The function must also import the array length, which will

Write a C function called randswap, which takes two arrays of void pointers as parameters. The function must also import the array length, which will be the same for both arrays. It should return an integer. The function should randomly swap pairs of array elements. There must be a 50% chance that the function will swap element i in the first array with element i in the second array, where 0 si
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
