Filters
Question type

Study Flashcards

What will be the value of result after the following code has been executed? What will be the value of result after the following code has been executed?   A) 10 B) 120 C) 20 D) This code will not compile.


A) 10
B) 120
C) 20
D) This code will not compile.

Correct Answer

verifed

verified

What is the value of donuts after the following code executes? What is the value of donuts after the following code executes?   A) 12 B) 10 C) 0 D) 1


A) 12
B) 10
C) 0
D) 1

Correct Answer

verifed

verified

This operator takes an operand and reverses its truth or falsehood.


A) | |
B) relational
C) arithmetic
D) !
E) None of these

Correct Answer

verifed

verified

If the sub-expression on the left side of an && operator is false, the expression on the right side will not be checked.

Correct Answer

verifed

verified

This operator represents the logical AND.


A) ++
B) | |
C) &&
D) @
E) None of these

Correct Answer

verifed

verified

Relational operators allow you to ________ numbers.


A) add
B) multiply
C) compare
D) average
E) None of these

Correct Answer

verifed

verified

If the sub-expression on the left side of the || operator is true, the expression on the right side will not be checked.

Correct Answer

verifed

verified

The default section of a switch statement performs a similar task as the ________ portion of an if/else if statement.


A) conditional
B) break
C) trailing else
D) All of these
E) None of these

Correct Answer

verifed

verified

What will the following program segment display? What will the following program segment display?   A) 7 15 B) 0 0 C) 10 10 D) 1 1 E) None of these


A) 7 15
B) 0 0
C) 10 10
D) 1 1
E) None of these

Correct Answer

verifed

verified

Which of the following expressions will determine whether x is less than or equal to y?


A) x > y
B) x =< y
C) x <= y
D) x >= y

Correct Answer

verifed

verified

An expression that has any value other than 0 is considered true by an if statement.

Correct Answer

verifed

verified

What will the following program display? What will the following program display?   A) 0 1 1 0 B) 0 0 1 0 C) 1 1 0 1 D) 1 0 0 1 E) None of these


A) 0 1 1 0
B) 0 0 1 0
C) 1 1 0 1
D) 1 0 0 1
E) None of these

Correct Answer

verifed

verified

Both of the following if statements perform the same operation. if (sales > 10000) commissionRate = 0.15; if (sales > 10000)commissionRate = 0.15;

Correct Answer

verifed

verified

Showing 41 - 53 of 53

Related Exams

Show Answer