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., and 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.

a) is a little bit flaky, but in my opinion it is wrong. b) is clearly wrong. Following d) will result in a sequence of all the same number.

Computer Science & Information Technology

You might also like to view...

You can disable a message in a method by right-clicking on that message in the editing area.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

If you need more memory on your smartphone, you may be able to add a(n)________

A) DRAM chip B) SD flash card C) CD D) ROM upgrade

Computer Science & Information Technology

Which of the following functions does NOT manipulate text?

A) UPPER B) INDEX C) CONCATENATE D) PROPER

Computer Science & Information Technology

What are the benefits provided by switches?

What will be an ideal response?

Computer Science & Information Technology