Multiple Choice
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;
Correct Answer:

Verified
Correct Answer:
Verified
Related Questions
Q17: The control variable in a flag-controlled while
Q18: Assume that all variables are properly declared.The
Q19: What is the output of the following
Q20: What is the next Fibonacci number in
Q21: The _ statement is typically used for
Q23: What is the value of x after
Q24: The function eof is a member of
Q25: Suppose sum, num, and j are int
Q26: In the case of the sentinel-controlled while
Q27: Assume all variables are properly declared.The output