answersLogoWhite

0


Best Answer

RAND: Rand uses a multiplicative congruential random number generator with period232 to return successive pseudo-random numbers in the range 0 to RAND_MAX.

Return Value: Rand returns the generated pseudo-random number. RANDOM(): Random returns a random number between 0 and (num-1).random(num) is a macro defined in STDLIB.H.

RANDOMIZE(): Randomize initializes the random number generator with a random value. Because randomize is implemented as a macro that calls the time function prototyped in TIME.H, you should include TIME.H when you use this routine

SRAND(): The random number generator is reinitialized by calling srand with an argument value of 1.The generator can be set to a new starting point by calling srand with a given seed number.

User Avatar

Wiki User

16y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the difference between the functions rand random srand and randomize?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How you can generate an random unique number in visual basic studio?

You can use this function: Function Random(ByVal Lowerbound As Long, ByVal Upperbound As Long) Randomize() Random = Int(Rnd * Upperbound) + Lowerbound End Function And use it by using: whatever.Text = Random(1, 1000) This example gives a number between 1 and 1000.


What is the difference between random sampling and non random sampling?

a


What is the difference between simple random sampling and random sampling?

Simple!


Can anyone randomize words for you?

If you have a list of words and would like to randomize them, you can use Microsoft's spreadsheet program, Excel. The formula =rand() can be used to take your original list of words and replicate them in random order.


What is the difference between Casio Fx 570Es and Casio Fx 570Es Plus?

PLUS has two extra New functions.... Random integer New Equation mode


Which suffix would you add to the word random to describe the act of making something random?

You would use -ize, I think (-ise if you're British). Randomize/Randomise.


What is the difference between a bias and a random error?

Bias is systematic error. Random error is not.


What is the difference between a random variable and random process?

A random process is a sequence of random variables defined over a period of time.


What do randomize number means in qbasic?

QBASIC CODE/EXAMPLE 1: WITHOUT 'RANDOMIZE' statement:- ==== RANDOMIZE TIMER CLS FOR eachDiceThrow% = 1 TO 10 diceNo% = INT(RND * 6) + 1 PRINT diceNo%; " "; NEXT END ===== ...output... 5 3 6 3 1 3 6 1 1 6 ...re-RUN/output... 6 2 6 5 1 4 1 5 6 5 As you can see from the above 2 code examples. When we don't use the RANDOMIZE statement; then, each time we run the program...the sequence of random numbers that gets produced...is always in the same 'fixed' order as went before. But, when we do use the RANDOMIZE command statement; then, each time the sequence of random numbers being produced is entirely 'different'. NOTE: The statement, RANDOMIZE TIMER, is used to 'seed' the QBASIC random number generator; by selecting a random number to start the sequence of numbers off with which is based on your current computer clock time.


What is the difference between sampling and random sampling?

Tatti meal


What is the difference between 'random' and 'randomn'?

"randomn" is not a real word.


What is the difference between random variable and random variate?

Random variables is a function that can produce outcomes with different probability and random variates is the particular outcome of a random variable.