Question
a.
1 + rand() % (10 - 1 + 1)
b.
1 + (10 - 1 + 1) % rand()
c.
10 + rand() % (10 - 1 + 1)
d.
10 + rand() % (10 + 1)
Posted under Object Oriented Programming Using C++
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. Which of the following formulas can be used to generate random integers between 1 and 10?
Similar Questions
Discover Related MCQs
Q. Format flags may be combined using the _____
View solution
Q. Which of the following will store the number 320000 as a Float number?
View solution
Q. The arguments that determine the state of the cout object are called
View solution
Q. A measure of the strength of the connection between two functions is
View solution
Q. The following statement where T is true and F is false T&&T||F&&T
View solution
Q. Which of the following statements declares a variable that can contain a decimal number?
View solution
Q. The statement int num[2][3]={ {1,2}, {3,4}, {5, 6} };
View solution
Q. Access specifiers are followed by
View solution
Q. Elements in an array are identified by a unique _____
View solution
Q. A C++ statement must end in a
View solution
Q. The statement int n[4] = {11, -13, 17, 105};
View solution
Q. The number of the relational operators in the C language is
View solution
Q. Which of the following tells C++ to display numbers with two decimal places?
View solution
Q. The operator that allocates new memory is _____
View solution
Q. A comment
View solution
Q. Which of the following is(are) valid identifier(s)?
View solution
Q. Reserving memory during program execution is known as reserving it
View solution
Q. "Rohan Motors" is a _____
View solution
Q. A programming structure that contains data and a pointer to the next object is a
View solution
Q. A variable declared in a function is called a(n) _____ variable
View solution
Suggested Topics
Are you eager to expand your knowledge beyond Object Oriented Programming Using C++? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!