SYNOPSIS
#include <publib.h>
void *memshuffle(void *block, size_t elsize, size_t elnum);
DESCRIPTION
memshuffle will move around the elements of an array in a random fashion. It uses the standard library function rand(3) to get the pseudo-random numbers it needs. The caller must set a suitable seed with srand(3).RETURN VALUE
memshuffle returns its first argument.EXAMPLE
To shuffle an integer array one might do the following.
int array[4] = { 1, 2, 3, 4 }; memshuffle(array, sizeof(array[0]), 4);