C#8, C#9 (06)

C#8, C#9 (06)

1st - 5th Grade

6 Qs

quiz-placeholder

Similar activities

Avaluació

Avaluació

5th - 6th Grade

8 Qs

Թեմատիկ աշխատանք N 2

Թեմատիկ աշխատանք N 2

1st - 10th Grade

10 Qs

pswk-laplace1

pswk-laplace1

1st - 10th Grade

10 Qs

Bài tập trắc nghiệm C++

Bài tập trắc nghiệm C++

3rd - 12th Grade

10 Qs

Programming - Iteration, Basic Programming Constructs & Loop

Programming - Iteration, Basic Programming Constructs & Loop

2nd - 12th Grade

10 Qs

MCA-Quiz-2

MCA-Quiz-2

1st - 3rd Grade

11 Qs

10 դասարան  ․Բաղադրյալ տվյալների պահպանման կառուցվածքներ, զանգվա

10 դասարան ․Բաղադրյալ տվյալների պահպանման կառուցվածքներ, զանգվա

1st Grade

10 Qs

Quiz ComPro 18-12-66

Quiz ComPro 18-12-66

1st Grade

10 Qs

C#8, C#9 (06)

C#8, C#9 (06)

Assessment

Quiz

Computers

1st - 5th Grade

Medium

Created by

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