Object Oriented Programming Using C++ - Section 8 :: Discussion


29.Which of the following formulas can be used to generate random integers between 1 and 10?
A.1 + rand() % (10 - 1 + 1)
B.1 + (10 - 1 + 1) % rand()
C.10 + rand() % (10 - 1 + 1)
D.10 + rand() % (10 + 1)
Answer:  Option  A
Explanation:

Tutorial Link:
Published by:Michael Daani

Comments are not available

Post your comments here:

Optional

Date to Date Current Affairs 2022

PakMCQs.net

Quick Links

GAT Subject



   Computer Science    English Mcqs    Agriculture    

Engineering



   Computer Science    Civil Engineering    

Technical



   Networking    Electronics    Database    

Past Papers



   Model Papers    FPSC Papers