C# Programming 2

Quiz
•
Computers
•
12th Grade
•
Hard
Anthony Orajiaka
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code?
bool isCSharpFun = true;
Console.WriteLine(isCSharpFun);
true
false
1
0
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? int x = 10;
if (x > 5) {
Console.WriteLine("Hello");
}
else
{
Console.WriteLine("Goodbye");
}
Hello
Goodbye
Error
Nothing
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which keyword is used to exit a switch statement?
stop
exit
break
return
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How many times will this loop run?
int i = 1;
while (i < 5) {
Console.WriteLine(i);
i++;
}
3
4
5
Infinite
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the correct syntax for a for loop?
for (int i = 0; i < 10; i++)
for i in range(0, 10)
loop(i = 0; i < 10; i++)
for i = 0; i < 10; i++
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does `continue;` do inside a loop?
Stops the loop completely
Skips the current iteration and moves to the next
Restarts the loop
Exits the program
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following correctly declares an array in C#?
int[] numbers = {1, 2, 3};
array numbers = {1, 2, 3};
int numbers = [1, 2, 3];
numbers = new array(1,2,3);
Create a free account and access millions of resources
Similar Resources on Wayground
14 questions
Code.org Unit 3

Quiz
•
9th - 12th Grade
12 questions
EMTECH POP QUIZ

Quiz
•
9th - 12th Grade
15 questions
JAVA: Level-1

Quiz
•
5th - 12th Grade
15 questions
Java Level 1 - C

Quiz
•
12th Grade
15 questions
C# Structured, Selection and Iteration

Quiz
•
9th Grade - University
15 questions
MP1 Test 1 - Objects Classes and Methods

Quiz
•
9th - 12th Grade
10 questions
Arduino Basic Programming

Quiz
•
12th Grade
9 questions
2.1.2 CSE Coding Fundamentals: Dead Reckoning

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

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

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade