
C# Quiz
Authored by Darryl Charles
Computers
University
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
13 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the syntax for declaring a variable in C#?
myVariable = int;
int myVariable;
var myVariable;
myVariable = int;
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which data type is used to store whole numbers in C#?
float
string
boolean
int
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the result of the following expression: 5 + 3 * 2?
16
7
11
10
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you write an if statement in C#?
if condition:
if (condition)
if (condition) {
if {condition}
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of a for loop in C#?
The purpose of a for loop in C# is to execute a block of code only once.
The purpose of a for loop in C# is to execute a block of code in a random order.
The purpose of a for loop in C# is to repeatedly execute a block of code for a specific number of times.
The purpose of a for loop in C# is to execute a block of code indefinitely.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you access an element in an array in C#?
array.index
array{index}
array[index]
array[element]
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the difference between a function and a method in C#?
A function is independent, while a method is associated with a class or an object.
A function is a keyword in C#, while a method is not.
A function can only be used in the main method, while a method can be used anywhere in the program.
A function can only return a single value, while a method can return multiple values.
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
11 questions
Determining System Requirements
Quiz
•
University
15 questions
1.1.1 The structure and function of the processor
Quiz
•
11th Grade - University
10 questions
Planning and Implementation of Information Security
Quiz
•
University
10 questions
Google Apps
Quiz
•
10th Grade - Professi...
18 questions
CIS2303 Week 4_5 Ch_3
Quiz
•
University
10 questions
INTO Artificial Intelligence
Quiz
•
University - Professi...
10 questions
Machine Learning (Introduction)
Quiz
•
University
10 questions
Entorno Financiero Digital 2do test
Quiz
•
University
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