Computer Science - Object Oriented Programming Using C++

31.
Which of the following formulas can be used to generate random integers between 1 and 10?
1 + rand() % (10 - 1 + 1)
1 + (10 - 1 + 1) % rand()
10 + rand() % (10 - 1 + 1)
10 + rand() % (10 + 1)
Answer: Option
Explanation:
No answer description is available. Let's discuss.

32.
Format flags may be combined using the _____
bitwise OR operator(|)
logical OR operator (||)
bitwise AND operator (&)
logical AND operator (&&)
Answer: Option
Explanation:
No answer description is available. Let's discuss.

33.
Which of the following will store the number 320000 as a Float number?
counPop = (float) 3.2e5;
counPop = (float) 3.2e6;
counPop = (float) .32e5;
counPop = (float) .32e7;
counPop = (float) 3.2-e5;
Answer: Option
Explanation:
No answer description is available. Let's discuss.

34.
The arguments that determine the state of the cout object are called
classes
manipulators
format flags or state flags
state controllers
Answer: Option
Explanation:
No answer description is available. Let's discuss.

35.
If a class will serve as a base class, most often the base class data members are
private
protected
public
polymorphic
Answer: Option
Explanation:
No answer description is available. Let's discuss.