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:

Verified
Correct Answer:
Verified
Related Questions
Q11: Placing the appropriate #include statement at the
Q12: Each C function is a separate and
Q13: The function _ returns the absolute value
Q14: When you write a function, you are
Q15: Many C compilers have a randomize() routine
Q17: In earlier versions of C, function prototypes
Q18: _ reads the computer's internal clock time,
Q19: The rand() function produces a series of
Q20: _ is the correct way to include
Q21: The purpose of a _ is to