
C#8, C#9 (06)

Quiz
•
Computers
•
1st - 5th Grade
•
Medium
Nataly Revutska
Used 1+ times
FREE Resource
6 questions
Show all answers
1.
FILL IN THE BLANK QUESTION
45 sec • 1 pt
In C# 9 and ___, the init keyword defines an accessor method in a property or indexer. An ___-only setter assigns a value to the property or the indexer element only during object construction.
2.
FILL IN THE BLANK QUESTION
2 mins • 1 pt
Write a single-line "Hello World" program.
3.
FILL IN THE BLANK QUESTION
1 min • 1 pt
Does it work?
...
int x = 0;
(x, int y) = point;
...
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of program:
var digits = new string[]
{ "one", "two", "three", "four", "five" };
var range = digits[^2..];
foreach (var digit in range)
Console.Write($"{digit} ");
one two three
four five
four
IndexOutOfRangeException trown
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Is code inside if operator executed?
int a = 10;
if (a is >= 20 and <30 or >=5 and <11)
{// Some code}
Yes
No
The code doesn't compile
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
We have constructed class:
public struct Coords<T>
{
public T X;
public T Y;
}
Are types Coords<int>, Coords<object> unmanaged?(since C# 8.0)
Yes. Both are unmanaged.
No. Neither are unmanaged.
Coords<int> are unmanaged, Coords<object> are not unmanaged
Coords<int> are not unmanaged, Coords<object> are unmanaged
Similar Resources on Wayground
8 questions
Цикл whille

Quiz
•
1st - 5th Grade
8 questions
Robotics Quiz

Quiz
•
1st - 12th Grade
10 questions
Introduction to Arrays

Quiz
•
KG - University
10 questions
Programming

Quiz
•
1st - 10th Grade
10 questions
Programación c++

Quiz
•
1st Grade
10 questions
Programming C++

Quiz
•
3rd - 5th Grade
10 questions
java-control structures-vlits

Quiz
•
1st Grade
11 questions
Caligrafía | CM7

Quiz
•
1st - 10th 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