Unity C# Basics, Variables and Operators
Quiz
•
Computers
•
9th - 12th Grade
•
Medium
Tim Helland
Used 45+ times
FREE Resource
Enhance your content in a minute
18 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of this code?
int x = 8;
// x = 3;
Console.WriteLine(x);
3
8
error
24
Answer explanation
The second line is preceeded by //. This means it is a comment and will be ignored during execution.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of this code?
int x = 16;
int y = 5;
Console.WriteLine(x/y);
3.2
3
error
4
Answer explanation
Since both variables are integers, the answer will also be an integer.
This means any decimal part of the answer will be completely ignored.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does <= mean?
less than
greater than
less than or equal to
greater than or equal to
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What punctuation is used to signal the beginning and end of code blocks?
{ }
-> and <-
BEGIN and END
( and )
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
After running the following code, what will be the value of x?
int y = 3;
x = 5 * y;
Compiler Error
Answer explanation
The variable x has been used before its type has been declared.
6.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
___ variables store whole numbers (-4, 3, 51, etc).
float
logical
char
int
double
7.
MULTIPLE SELECT QUESTION
20 sec • 1 pt
___ variables store decimal numbers (3.5, -5,123, 4.0, etc).
float
int
string
character
double
Create a free account and access millions of resources
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
Primary storage
Quiz
•
9th - 11th Grade
20 questions
Microsoft Excel
Quiz
•
KG - Professional Dev...
14 questions
TRENDS IN ICT
Quiz
•
12th Grade
17 questions
Basic Docs
Quiz
•
8th - 9th Grade
20 questions
CSS 10 - QUIZ
Quiz
•
10th Grade
15 questions
CIW
Quiz
•
9th - 12th Grade
16 questions
C-Programming Basics
Quiz
•
12th Grade
21 questions
Y9 Creative iMedia RO81 Quiz Part 1
Quiz
•
9th Grade
Popular Resources on Wayground
10 questions
Forest Self-Management
Lesson
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
30 questions
Thanksgiving Trivia
Quiz
•
9th - 12th Grade
30 questions
Thanksgiving Trivia
Quiz
•
6th Grade
11 questions
Would You Rather - Thanksgiving
Lesson
•
KG - 12th Grade
48 questions
The Eagle Way
Quiz
•
6th Grade
10 questions
Identifying equations
Quiz
•
KG - University
10 questions
Thanksgiving
Lesson
•
5th - 7th Grade
Discover more resources for Computers
30 questions
Thanksgiving Trivia
Quiz
•
9th - 12th Grade
11 questions
Would You Rather - Thanksgiving
Lesson
•
KG - 12th Grade
10 questions
Identifying equations
Quiz
•
KG - University
18 questions
Thanksgiving Trivia
Quiz
•
4th - 12th Grade
20 questions
Thanksgiving
Quiz
•
KG - 12th Grade
20 questions
Pythagorean Theorem and Their Converse
Quiz
•
8th - 9th Grade
10 questions
Understanding Meiosis
Interactive video
•
6th - 10th Grade
10 questions
Thanksgiving Trivia Challenge: Test Your Knowledge!
Interactive video
•
6th - 10th Grade
