
Java Arithmetic Operations
Authored by ANISA CUROVIC
Computers
11th Grade
Used 1+ 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
public class GuessNumber {
public static void main(String[] args) {
int a = 42;
int b = -7;
int c = a % b;
int d = b % a;
System.out.println(c + ", " + d);
}
}
0,-6
0,6
-6,0
6,0
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
class MyClass
{
public static void main(String s[])
{
int a = 34.0;
int b = 7;
int c = a % b;
System.out.println("c = " + c );
}
}
c = 4
The program does not compile
k = 6
k = 0
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
public class BigNumbers {
public static void main(String[] args) {
System.out.println(10 * 5 + 100 * (25 * 11) / (25 * 10) * 10 - 5 + 7 % 2);
int zx = (10 * 5 + 100 * (25 * 11));
int yz = ((25 * 10) * 10 - 5 + 7 % 2);
System.out.println(zx / yz);
}
}
1046
1046
1046
10
1146
1146
1146
11
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
public class Mods {
public static void main(String[] args) {
int x = 15;
int y = x % 4;
int z = y * 24;
System.out.println(z / 2);
}
}
84
36
2
3
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Your code divides two integers: x = 55; y = 8. Which of the following will generate the real value (6.875)?
double z = x/y;
int z = double x / double y;
z = x/ double y
double z = ((double) x / (double) y)
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
class Addition
{
public static void main(String s[])
{
int a = 4;
a -= 10;
a = -a;
a = 7 + a;
System.out.println(" a = " + a );
a %= a;
a = a * a - 3 ;
System.out.println(" a = " + a );
}
}
a = 13
a = -3
a = 33
a = 163
a = 33
a = 163
Program does not compile
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
public class Relation {
public static void main(String args[]) {
int a = 10;
int b = 15;
a++;
b--;
int c = b % a;
System.out.println(c >= b);
}
}
true
false
Compilation Error
Runtime Error
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?
Similar Resources on Wayground
13 questions
AI-1
Quiz
•
KG - University
10 questions
Post-Test Routing
Quiz
•
11th Grade
15 questions
PRE TEST ASJ-FILE SERVER-SEMESTER II
Quiz
•
11th Grade
15 questions
python basics
Quiz
•
11th Grade - University
15 questions
Code Combat Curso Junior
Quiz
•
9th - 12th Grade
10 questions
POST TEST C++
Quiz
•
11th Grade
10 questions
AlexaSkillProgram
Quiz
•
9th - 12th Grade
10 questions
Python quiz
Quiz
•
10th Grade - Professi...
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
Discover more resources for Computers
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
15 questions
Christmas Song Emoji Pictionary
Quiz
•
7th - 12th Grade
20 questions
Christmas Movies
Quiz
•
1st - 12th Grade
20 questions
Christmas Movie Trivia
Quiz
•
9th - 12th Grade
29 questions
christmas facts
Lesson
•
5th - 12th Grade
20 questions
Christmas Trivia
Quiz
•
5th - 12th Grade
20 questions
Stages of Meiosis
Quiz
•
9th - 12th Grade
20 questions
christmas songs
Quiz
•
KG - University