Generate random number in C