Question: 6. Random numbers with demos 6.1 int rand(void): returns a pseudo-random number in the range of 0 to RAND MAX O. RAND MAX is a
6. Random numbers with demos 6.1 int rand(void): returns a pseudo-random number in the range of 0 to RAND MAX O. RAND MAX is a constant defined by the implementation. 6.2 void srand(unsigned seed ): Seeds the pseudo-random number generator used by rand with the value seed. Usually, a parameter, time(0), is used for srando. time() returns a time t value which vary every time and hence the pseudo-random number vary for every program call. Examplel: 1 #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
