Solved

Scaling a Random Number as an Integer Value Between 1

Question 16

Multiple Choice

Scaling a random number as an integer value between 1 and N is accomplished using the expression ____.


A) 1 + (int) rand() / N
B) 1 + (int) rand() % N
C) (int) rand() / N
D) (int) rand() % N

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions