We studied the rand() and srand(int) library functions. The function rand() returns pseudorandom numbers. What does pseudorandom mean? What is srand for?

a) Repeated calls to the rand() function returns a string of numbers that are mostly
different but they aren’t random in any sense.
b) Pseudorandom numbers are things that resemble numbers but aren’t numbers.
c) In scientific use the word pseudo means resembling. A pseudorandom number
sequence resemble random number sequence, but are not strictly random.
d) The function srand(arg) is a helper function for rand(). It must be called
with the same argument, just before rand(), every time rand() is called.
e) The function srand(arg) is the seeding function for rand(). Each call to s
srand(arg) with a different argument enables a sequence of calls to rand()
to generate a different sequence of pseudorandom numbers.

c) In scientific use the word pseudo means resembling. A pseudorandom number
sequence resemble random number sequence, but are not strictly random.
e) The function srand(arg) is the seeding function for rand(). Each call to s
srand(arg) with a different argument enables a sequence of calls to rand()
to generate a different sequence of pseudorandom numbers.

Computer Science & Information Technology

You might also like to view...

Deleted records or fields:

A) can be undone by the "re-add" box B) can be undone by the "undo" box. C) can be undone by the "reverse warning" box D) cannot be undone.

Computer Science & Information Technology

A(n) ________ field is a field used to determine the order of the records

Fill in the blank(s) with correct word

Computer Science & Information Technology