shuffle function in c

[ad_1]

shuffle function in c
#include 

void shuffle(int arr[], int size){
    srand(time(0));
    for (int i = 0; i < size; i++) {
        int j = rand() % size;
        int t = arr[i];
        arr[i] = arr[j];
        arr[j] = t;
    }
}

[ad_2]

Content Protection by DMCA.com
Please Share