/** * Alex Cohn and Jordan Shkolnick * 3/9/10 * CSC323: make * array-utils.c: contains string swap method. **/ #include "array-utils.h" /** * Swap the elements in positions i and j of A. * Pre: * 0 <= i,j < length of A * A[i] = I * A[j] = J * Post * A[i] = J * A[j] = I * For all x, x != i and x != j, A[x] is unchanged. */ void str_swap (char *A[], int i, int j) { char* temp = A[i]; A[i] = A[j]; A[j] = temp; }