i want to make a program in which i have to display an array of random number from 1 to 10 .and the number should be shuffled but each number can occur only once ..
every time i run the program using random function it gives the same number again and again i have also used s rand but it is of no use
You are resetting the seed on every pass through the for loop. That will force it to generate the same random number each time (except on the rare occasion where the time changes to the next second during execution).
Place the srand call at the very start of main(), before any other processing. Don't put it inside a loop.