for(i = 0; i < n; i++){
srand(time(NULL));
printf(\"%d \", time(NULL));
for(j = 0; j < (n-1); j++){
a[i][j] = rand();
You need to call srand() before entering the loop. srand() initializes the radnom number generator with the given seed and generates unique sequence of random numbers for this seed.
Your loop executes very fast so every call to time(NULL) yields the same time (measured in seconds) - hence you initialize random number generator with the same seed on every loop iteration.