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
Q6: A loop that continues to execute endlessly
Q7: Suppose sum and num are int variables,
Q8: In a counter-controlled while loop, the loop
Q9: In the case of the sentinel-controlled while
Q10: The control statements in the for loop
Q12: What is the output of the following
Q13: The number of iterations of a counter-controlled
Q14: The control variable in a flag-controlled while
Q15: What is the output of the following
Q16: In _ structures, the computer repeats particular
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents