Generating random number in C without using rand