Search Header Logo

NUMERICAL DATA 1

Authored by ALAWIYAH WAHAB

Information Technology (IT)

University

Used 1+ times

NUMERICAL DATA 1
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the output when the following code fragment is executed?

int num1=5, num2=5;

num1=10;

num2 = num1;

num2 += num1 + num2;

System.out.println(num2);

10

20

25

30

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following format specifiers is used to display a floating-point number with two decimal places?

%2d

%.2d

%.2f

%2f

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output when the following code fragment is executed?

int a = 5, b = 3;

int result = a % b;

System.out.println(result);

0

1

2

3

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In Java programming, what data type would the value 3.14 belong to?

integer

float

String

Boolean

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the value of the expression 6 + 5 / 2 in Java?

5.5

6

8

8.5

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?