I would just use something simple like rand() to generate the random numbers. Then just check if the number is already in the array and that it's not the same as the array index you're storing it in. If one of those checks fails just grab another random number and try again.
Code:
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main(void)
{
int nums[100];
int i, j;
int again;
srand(time(0)); // Seed pseudo random number generator
for(i = 0;i < 100;++i)
{
do
{
again = 0;
nums[i] = rand();
if(nums[i] == i)
{
again = 1;
continue;
}
for(j = 0;j < i;++j)
if(nums[j] == nums[i])
{
again = 1;
break;
}
} while(again);
}
for(i = 0;i < 100;++i)
printf("nums[%d] = %d\n", i, nums[i]);
return 0;
}