
C# Operators
Authored by Michael Atienza
Computers
10th Grade
Used 12+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
25 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
2 mins • 2 pts
You are writing a program to determine if a user's input int age is eligible for a senior discount (age 60 or older). Which of the following conditions would you use?
age > 59
age >= 60
age == 60
age < 60
2.
MULTIPLE CHOICE QUESTION
2 mins • 2 pts
You have two variables int x = 10; and int y = 5;. You want to check if x is greater than twice the value of y. Which of the following expressions should you use?
x > 2 * y
x == 2 * y
x < 2 * y
x >= 2 * y
3.
MULTIPLE CHOICE QUESTION
2 mins • 2 pts
You are developing a program to compare two strings string str1 and string str2. You want to check if str1 is lexicographically greater than str2. Which of the following expressions would you use?
You are developing a program to compare two strings string str1 and string str2. You want to check if str1 is lexicographically greater than str2. Which of the following expressions would you use?
str1 > str2
str1 == str2
str1 < str2
str1 != str2
4.
MULTIPLE CHOICE QUESTION
2 mins • 2 pts
You have a boolean variable bool isRainy = true; and want to check if it's not raining. Which of the following expressions should you use?
isRainy
!isRainy
isRainy == true
isRainy != false
5.
MULTIPLE CHOICE QUESTION
2 mins • 2 pts
You are validating user input for a positive integer int num. You want to ensure that num is greater than zero. Which of the following conditions would you use?
num >= 0
num == 0
num < 0
num > 0
6.
MULTIPLE CHOICE QUESTION
2 mins • 2 pts
In a game, you want to check if the player's score int playerScore is at least 100 points to qualify for the next level. Which of the following conditions should you use?
playerScore > 100
playerScore >= 100
playerScore == 100
playerScore < 100
7.
MULTIPLE CHOICE QUESTION
2 mins • 2 pts
You have two variables double price = 25.50; and double budget = 50.00;. You want to check if the price is within the budget. Which of the following expressions should you use?
price == budget
price >= budget
price > budget
price <= budget
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
20 questions
Summative test 4th
Quiz
•
10th Grade
20 questions
Microsoft Excel
Quiz
•
KG - Professional Dev...
20 questions
CSS 10 - QUIZ
Quiz
•
10th Grade
20 questions
LATIHAN SIMDIG
Quiz
•
9th - 12th Grade
20 questions
Ασφάλεια στο Διαδίκτυο
Quiz
•
10th Grade
20 questions
Yr 11 ICT quiz 1 Networks & Security
Quiz
•
10th - 11th Grade
22 questions
1.3.2 Network Topologies and Layers
Quiz
•
10th - 11th Grade
20 questions
MS Word Shortcut
Quiz
•
9th - 12th Grade
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
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
20 questions
Figurative Language Review
Quiz
•
6th Grade