
C# Quiz

Quiz
•
Computers
•
University
•
Hard
Darryl Charles
Used 2+ times
FREE Resource
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.
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
C++ Quiz-1

Quiz
•
University
10 questions
Quiz on OOPs- Day 1 (30-01-2025)

Quiz
•
University
10 questions
STM 20483 QUIZ 1

Quiz
•
University
15 questions
Object Oriented Programming Assessment 1

Quiz
•
University
16 questions
Subprograms and ADT

Quiz
•
University
16 questions
MOSI SI

Quiz
•
University
15 questions
Quiz 1

Quiz
•
University
10 questions
Visual Basic Intro

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
15 questions
Properties of Equality

Quiz
•
8th Grade - University
38 questions
WH - Unit 3 Exam Review*

Quiz
•
10th Grade - University
21 questions
Advise vs. Advice

Quiz
•
6th Grade - University
12 questions
Reading a ruler!

Quiz
•
9th Grade - University