Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need help on these C++ multi choice questions: 1. What is the value of x after

ID: 3772259 • Letter: I

Question

I need help on these C++ multi choice questions:

1. What is the value of x after the following statement? float x; x = 2.0 / 4.0 + (2 + 7) / 4 Question 7

options:

a. 2.75

b. 2.5

c. 4.25

d. 2.0

2. What is the value of the following expression?

(false || (4-3 && 6))

a. true

b. false

c. 0

d. illegal syntax

3. if x is -1, what is the value of (!(x == 0))?

a. false

b. true

c. unable to determine

d. invalid syntax

4. Array can only store integers.

5. Arrays can be passed to functions.

b. False

6. Given the following array:


7. What is the POSITION of the first element encountered in a binary search for the value 19?

Given the following array:


8. What is the POSITION of the second element encountered in a binary search for the value 19?

Given the following array:


What is the POSITION of the third element encountered in a binary search for the value 19?

a. true

b. false

c. 0

d. illegal syntax

3. if x is -1, what is the value of (!(x == 0))?

a. false

b. true

c. unable to determine

d. invalid syntax

Explanation / Answer

1. a) 2.75

2. d) Illegal syntax......since we can not compare boolean values with integers

3. b) true

4. b) false

5. a) true

6. first element encountered is: 17 at position 4

7. The second element encountered is: 32 at position 6

8. Third element encountered is : 21 at position 5

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote