
B4 - Increment, Decrement, and Assignment Operators
Authored by R3g Gaming
Other
University
Used 9+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the most common operation performed by a program?
Adding integer one to an integer variable.
Floating point division.
Object construction.
Internet access.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What two steps are performed when an assignment statement is executed?
- The expression on the right of the "=" is evaluated, "using" all the variables it contains.
- The result of evaluation is assigned to the variable on the left of the "=".
- All appropriate variables are incremented or decremented.
- The result is assigned to the variable on the left of the "=".
- All appropriate variables are incremented.
- All appropriate variables are decremented.
- The arithmetic expression is evaluated and assigned to the variable on the left of the "=".
- Variables are auto-incremented or auto-decremented.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the meaning of variable++ ?
Add one to the variable.
Add one to the variable after its current value has been used.
Add one to the variable before using its value.
Double the value in the variable.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the following program output to the monitor:
int value = 0;
int count = 1;
value = count++ ;
System.out.println("value: "+ value " + count: " + count );
value: 0 count: 0
value: 0 count: 1
value: 1 count: 1
value: 1 count: 2
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the following program output to the monitor:
int value = 0;
int count = 1;
value = ++ count ; /* note change from previous */
System.out.println("value: "+ value " + count: " + count );
value: 0 count: 1
value: 1 count: 1
value: 1 count: 2
value: 2 count: 2
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following:
int a = 0;
int b = 10;
a = --b ;
System.out.println("a: " + a + " b: " + b );
a: 9 b:11
a: 10 b: 9
a: 9 b:9
a: 0 b:9
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following program:
double w = 12.5 ;
w *= 2 ;
System.out.println( " w is " + w );
w is 12.5
w is 13.5
w is 25.0
w is 2
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
Discover more resources for Other
7 questions
How James Brown Invented Funk
Interactive video
•
10th Grade - University
5 questions
Helping Build the Internet: Valerie Thomas | Great Minds
Interactive video
•
11th Grade - University
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
19 questions
Review2-TEACHER
Quiz
•
University
15 questions
Pre2_STUDENT
Quiz
•
University
20 questions
Ch. 7 Quadrilateral Quiz Review
Quiz
•
KG - University