CS402 T02b

CS402 T02b

Professional Development

10 Qs

quiz-placeholder

Similar activities

Tema 2 Unidades funcionales

Tema 2 Unidades funcionales

Professional Development

10 Qs

Activate Learning - Reading College

Activate Learning - Reading College

Professional Development

10 Qs

Cuestionario SQL

Cuestionario SQL

Professional Development

10 Qs

GIT

GIT

Professional Development

15 Qs

Introduction

Introduction

Professional Development

10 Qs

URGENSI PEMANFAATAN IT DALAM PEMBELAJARAN

URGENSI PEMANFAATAN IT DALAM PEMBELAJARAN

Professional Development

10 Qs

Day3 - Python STT

Day3 - Python STT

Professional Development

10 Qs

Fun and Interesting Facts about Technology

Fun and Interesting Facts about Technology

University - Professional Development

10 Qs

CS402 T02b

CS402 T02b

Assessment

Quiz

Computers

Professional Development

Practice Problem

Hard

Created by

Mike Wong

Used 4+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

1. What would happen if you attempt to store a value of 1000 in a byte variable?

It will store successfully.

A compilation error occurs.

A runtime error occurs.

It will store the value as 127.

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

2. What is the correct way to represent a floating-point literal in Java?

100.5L

100

100.5f

100.5

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

3. What is the default type for a floating-point literal in Java?

float

double

long

byte

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

4. Which of the following is true about implicit casting in Java?

It converts a double to int.

It automatically widens a smaller type to a larger type.

It truncates decimal places.

It only works for int and byte types.

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

5. Which operator is used for incrementing a variable by 1 in Java?

++

--

+=

==

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

6. What is the output of the following code?

int i = (int) 3.9;

System.out.println(i);

4

3.9

3

Compilation error

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

7. What will be the output of the following code?

int x = 10;

System.out.println(++x + x++);

11

20

21

22

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?