Which of the following statements generates a random number between 0 and 50?

A. srand(time(0));
num = rand() % 50;
B. srand(time(10));
num = rand()/50;
C. srand(time(0));
num = rand()50;
D. srand(time(10));
num = rand() % 50;


Answer: A

Computer Science & Information Technology

You might also like to view...

_____ is a remote location for storage of data from Apple devices

Fill in the blank(s) with correct word

Computer Science & Information Technology

A laptop docking installation requires a tower or a minitower

Indicate whether the statement is true or false

Computer Science & Information Technology

Dragging the vertical scroll bar does which of the following?

A) Shows a subset of Ribbon commands B) Displays Word Options C) Repositions the insertion point D) Displays another part of the document but does not move the insertion point

Computer Science & Information Technology

Every node in a binary tree has at most ____ children.

A. one B. two C. three D. four

Computer Science & Information Technology