I want to set new seed every time when function is called.
I have tried implementing srand(time(NULL)) in function, that uses rand(). But that doesn't work. I also tried to implement srand(rand()), but every time array is generated it's elements is the same.
I have also tried adding one function (my_init()):
void my_init()
{
    srand(time(NULL));
}
void fillArray(int arr[], int n)
{
    srand(rand());
//    srand(time(NULL));
    for(int i = 0; i < n; ++i)
    {
        arr[i] = rand() % 100;
    }
}
