There are methods for creating random variables.For example you give the "Time" as a seed which is different at every execution of the statement.
for example:
srand(Time Null) -This is totally wrong by means of coding though,this gives the time as seed-
int x=rand("There are statements here I forgot and cba to find")
printf("Random value is %d",x);
Thats basically it,(very basic).
