Question: QUESTION 1 Examine the code. When will C be assigned 3? (Be careful.) if (A == B); C = 3; when A is equal to

QUESTION 1

Examine the code. When will C be assigned 3? (Be careful.) if (A == B); C = 3;

when A is equal to B

when A is not equal to B

never

every time the program is executed

not enough information is given

QUESTION 2

Given the following segment of code, what will be the output? int x = 5; if (x == 2) Write("Brown, brown, run aground. "); else Write("Blue, blue, sail on through. "); Write("Green, green, nice and clean.");

Brown, brown, run aground.

Blue, blue, sail on through.

Brown, brown, run aground. Blue, blue, sail on through.

Blue, blue, sail on through. Green, green, nice and clean.

none of the above

QUESTION 3

Complete the tables below for Logical And and Or (T and F denote true and false.) P Q P And Q T T T T F F T F F F P Q P Or Q T T T T F F T F F F

QUESTION 4

After execution of the following code, what will be the value of inputValue? int inputValue = 0; if (inputValue > 5) inputValue += 5; else if (inputValue > 2) inputValue += 10; else inputValue += 15;

15

10

25

0

5

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!