Question
Hello i need these multiple choice answered for my c++ class. 1. An if statement can use this symbol -&&, which is a ; a.
Hello i need these multiple choice answered for my c++ class.
1. An if statement can use this symbol -&&, which is a ;
a. NOT
b. OR
c. UMNOT
d. AND
2. Which of the below gives an output of a random number between 1 and 6?
a. rand()% 6
b. random()% 6
c. random()% 5+1
d. rand() 6 + 1
3. Which symbol should we use to convert 51 to 1?
a. ==2
b. += 5
c. %2
d. ++
4. An if statement can use this symbol - ||. which is a;
a. OR
b. NOT
c. AND
d. XOR
5. An if statement
a. may contain an else if and else afterwards
b. may only have two else ifs afterwards
c. cannot have an else unless there is an else if
d. may only have up to five else ifs afterwards
6. Which symbol would switch something from true to false
a. ||
b. &&
c. <>
d. !
7. In order to ensure that our random numbers are truly random we must use;
a. timeRand()
b. a nested rand
c. srand
d. Random r = new Random()
8. An if statement is also called a ;
a. logical AND
b. decision statement
c. logical OR
d. logical NOT
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started