Possible Duplicates:
Generate Random numbers uniformly over entire range
In C, how do I get a specific range of numbers from rand()?
i want to generate random number in C. It has rand() and srand() function in stdlib.h But it gives me very large number. But I want only number b/w 1 to 10. So, is it possible and if yes then how? If is possible to generate character from a-z randomly.