Computers and Technology

Which of the following expressions will evaluate to true? (3 points) 7 == 7.0
7 != 7.0
7 < 7.0
Question 1 options:

1)

I only

2)

II only

3)

III only

4)

I and III only

5)

II and III only
Question 2 (3 points)
Saved
Which of the following expressions will evaluate to true? (3 points)

12 / 5 != 2.0
12 / 5.0 == 2.0
(int)(12.0 / 5.0) == 2.0
Question 2 options:

1)

I only

2)

II only

3)

III only

4)

I and II only

5)

I and III only
Question 3 (3 points)
Assume an integer variable named num is assigned a value of 20. What is the value of num - 7 < 15? (3 points)

Question 3 options:

1)

True

2)

False

3)

0

4)

1

5)

An error occurs
Question 4 (3 points)
What is the result of the following code segment? (3 points)

int x = 10;
if(x + 1 < 20)
x += 5;
System. out. println(x);

Question 4 options:

1)

10

2)

11

3)

15

4)

16

5)

20
Question 5 (3 points)
Assume the integer variable num has been assigned a valid value. What is the purpose of the following code segment? (3 points)

if(num % 10 != 0)
System. out. print(num);

Question 5 options:

1)

It prints num if its value is a multiple of 10.

2)

It prints num if its value is not a multiple of 10.

3)

It always prints the value of num.

4)

It never prints the value of num.

5)

An error occurs at compile time.

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 12:00, daelinrobinson
If you're using an existing powerpoint presentation that will receive new slides based on a word outline, select the a. slide that will appear after the new slides. b. first slide in the presentation. c. slide that will appear before the new slides. d. last slide in the presentation.
Answers: 2
image
Computers and Technology, 25.06.2019 07:50, hayleneolide
Identify an advantage of centralized processing
Answers: 1
image
Computers and Technology, 25.06.2019 13:00, LoneWolves
Ok so im actually just wondering can you change you username
Answers: 2
image
Computers and Technology, 25.06.2019 20:30, dangolstein03
David needs to create a new spreadsheet that will him determine the payroll deductions for each new employee. which function would he use when he wants the spreadsheet
Answers: 1
Do you know the correct answer?
Which of the following expressions will evaluate to true? (3 points) 7 == 7.0
7 != 7.0
...

Questions in other subjects:

Konu
History, 22.09.2019 21:00
Konu
Chemistry, 22.09.2019 21:00
Konu
Mathematics, 22.09.2019 21:00
Konu
Mathematics, 22.09.2019 21:00