C Function of Fisher-Yates Implementation (Random Shuffling Algorithm)
The following is a random shuffling function in C. This uses the Fisher-Yates algorithm, which guarantees an unbiased shuffle. #include <stdlib.h> #include <time.h> void shuffle(int *array, size_t n) { …