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

Help with some basic comp sci! Assuming that variables value1 and value2 are bot

ID: 648557 • Letter: H

Question

Help with some basic comp sci!

Assuming that variables value1 and value2 are both declared as ints,which of the following statements causes the result of the calculation to be truncated?

A)


B)


C) double result = value1 / value2
D) All of the above.

When a double containing the value 2.718 is cast to an int, the int will contain the value _______?

A) 2.7
B) 3
C) 2
D) a double can not be cast to an int.

In a for loop, the control variable is incremented (or decremented) _______?

A) after the body of the loop executes
B) before the body of the loop executes
C) while the loop-continuation condition is false
D) while the body of the loop executes

The _______ signifies the end of a switch statement.

A) end keyword
B) } character
C) break keyword
D) default keyword

25.

_______ is a valid case label.

A) case: 'A'
B) case: "A"
C) case 'A':
D) case: 1

_______ separates the case label from the code that will execute if the case label matches the controlling expression.

A) A colon
B) An underscore
C) The break keyword
D) A semicolon

A function definition is made up of _______.

A) a function header
B) a function body
C) a function name
D) All of the above.

If a C++ function does not use parameters, you still must put parentheses around the empty parameter list.

A) True
B) False

if all of these are answered correctly I will award you points

Explanation / Answer

1) C

2) C (2)

3) A

4) B ({ character)

5) C (case 'A':)

6) A (a colon)

7) D

8) A (True)

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