
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
10 questions
Talent Next Java MCQ-1

Quiz
•
University
15 questions
Class Diagrams

Quiz
•
University
15 questions
Object Oriented Programming Quiz

Quiz
•
University
10 questions
Objection-Oriented Concepts

Quiz
•
University
15 questions
Chapter 1 Introduction to Computers and Java

Quiz
•
University
10 questions
OOP intro quizz

Quiz
•
University
10 questions
INTRODUCTION TO OOPS

Quiz
•
University
11 questions
Java Programming

Quiz
•
University
Popular Resources on Wayground
12 questions
Unit Zero lesson 2 cafeteria

Lesson
•
9th - 12th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
20 questions
Lab Safety and Equipment

Quiz
•
8th Grade
13 questions
25-26 Behavior Expectations Matrix

Quiz
•
9th - 12th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
15 questions
Let's Take a Poll...

Quiz
•
9th Grade - University
2 questions
Pronouncing Names Correctly

Quiz
•
University
12 questions
Civil War

Quiz
•
8th Grade - University
18 questions
Parent Functions

Quiz
•
9th Grade - University
21 questions
Mapa países hispanohablantes

Quiz
•
1st Grade - University
19 questions
Primary v. Secondary Sources

Quiz
•
6th Grade - University
25 questions
Identifying Parts of Speech

Quiz
•
8th Grade - University
20 questions
Disney Trivia

Quiz
•
University