B4 - Variables and the Assignment Statement

B4 - Variables and the Assignment Statement

University

10 Qs

quiz-placeholder

Similar activities

IMPORTANT BRANDING DECISSIONS

IMPORTANT BRANDING DECISSIONS

University

15 Qs

Videojuegos

Videojuegos

2nd Grade - Professional Development

11 Qs

Le pronom "On"

Le pronom "On"

University

11 Qs

Leaders of The World

Leaders of The World

KG - University

10 Qs

Womens Health

Womens Health

University

10 Qs

QUIZ TQM MAC 2023

QUIZ TQM MAC 2023

University

15 Qs

Beyblade Burst Quiz

Beyblade Burst Quiz

KG - University

6 Qs

Introduction of IP

Introduction of IP

University

10 Qs

B4 - Variables and the Assignment Statement

B4 - Variables and the Assignment Statement

Assessment

Quiz

Other

University

Practice Problem

Hard

Created by

Ahmetcan türk

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

30 sec • 1 pt

Which one of the following is a reserved word?

apple

7up

grandTotal

boolean

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which one of the following is NOT a correct variable name?

2bad

zero

theLastValueButOne

year2000

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which one of the following declarations is NOT correct?

double duty;

float loan;

boolean value = 12;

int start = 34, end = 99;

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the following program output?

class question4 { 

public static void main ( String[] args ) {
int unitCost = 8;
int items = 5; 
System.out.println("total cost: " + (unitCost * items) ); 
}
}

total cost: + 40

total cost: 8*5

 total cost: 40

 "total cost: " 40

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following shows the syntax of an assignment statement?

variableName = expression;

expression = expression;

expression = variableName;

dataType = variableName;

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What are the two steps that take place when an assignment statement is executed?

(i) Evaluate the Expression, and (ii) Store the value in the variable.

(i) Store the value in the variable, and (ii) Evaluate the Expression.

(i) Reserve memory , and (ii) fill it with a number.

(i) Evaluate the variable, and (ii) store the results.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is an expression?

The same thing as a statement.

An expression is a list of statements that make up a program

An expression is a combination of literals, operators, variables, and parentheses used to calculate a value.

An expression is a number expressed in digits.

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?