Home / CSE / Object Oriented Programming Using C++ :: Discussion

Discussion :: Object Oriented Programming Using C++

  1. Which of the following formulas can be used to generate random integers between 1 and 10?

  2. A.
    1 + rand() % (10 - 1 + 1)
    B.
    1 + (10 - 1 + 1) % rand()
    C.
    10 + rand() % (10 - 1 + 1)
    D.
    10 + rand() % (10 + 1)

    View Answer

    Workspace

    Answer : Option A

    Explanation :

    No answer description available for this question.


Be The First To Comment