Computer Programming 1 Practice Midterms

Computer Programming 1 Practice Midterms

University

28 Qs

quiz-placeholder

Similar activities

SD_Prelim Exam

SD_Prelim Exam

University

25 Qs

Introduction to Java Programming

Introduction to Java Programming

University

25 Qs

Java Introduction

Java Introduction

University

25 Qs

msp quiz

msp quiz

University - Professional Development

23 Qs

Ciclos

Ciclos

12th Grade - University

23 Qs

DEBUGGING

DEBUGGING

University

26 Qs

DBC-IT104 Prelim Quiz

DBC-IT104 Prelim Quiz

University

30 Qs

Think Tank Tuesday

Think Tank Tuesday

University

30 Qs

Computer Programming 1 Practice Midterms

Computer Programming 1 Practice Midterms

Assessment

Quiz

Computers

University

Hard

Created by

Kharl Nadonza

FREE Resource

28 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Java is a

Compiled Language

Interpreted Language

Both Compiled and Interpreted Language

None of the above

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the System.out.println(10%3);?

1

3

0

10

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following loops is guaranteed to execute at least once?

for loop

while loop

do while loop

all of the above

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct syntax for an if statement in Java?

if condition { }

if (condition) { }

if {condition}

if [condition] { }

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to take user input in Java?

Scanner sc = new Scanner(System.in)

Scanner sc = new Input(System.in)

cin >> x;

input(x);

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of System.out.println(5 + 3 + "Hello" + 2 + 1);?

8Hello3

8Hello21

53Hello2

Hello531

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is NOT a valid identifier in Java?

num_1

_value

2count

MAX_VALUE

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?