C# for YP

C# for YP

Professional Development

30 Qs

quiz-placeholder

Similar activities

TOEIC Short Conversation 1

TOEIC Short Conversation 1

Professional Development

25 Qs

2nd Semester NSQF - Module 2 - Work holding devices

2nd Semester NSQF - Module 2 - Work holding devices

Professional Development

25 Qs

Freedom Reference Guide

Freedom Reference Guide

Professional Development

25 Qs

CFS SAPER (2016) - Part 2 (Pg. 13-26)

CFS SAPER (2016) - Part 2 (Pg. 13-26)

Professional Development

25 Qs

Assessment-to-be!

Assessment-to-be!

Professional Development

25 Qs

WL2 Units 1-3

WL2 Units 1-3

Professional Development

25 Qs

MIDTERM EXAMINATION_ASSESSMENT OF LEARNING_PART 1_MC

MIDTERM EXAMINATION_ASSESSMENT OF LEARNING_PART 1_MC

12th Grade - Professional Development

25 Qs

C# for YP

C# for YP

Assessment

Quiz

Professional Development

Professional Development

Practice Problem

Medium

Created by

Dotnet Quiz

Used 2+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to declare a nullable integer in C#?

int? number = null;
int number = null;
nullable int number = null;
Int32? number = void;
None of these

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is NOT a valid access modifier in C#?

public
private
internal
package
None of these

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code? string str = null;Console.WriteLine(str?.Length ?? 0);

NullReferenceException
0
null
Compilation error
None of these

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to prevent a class from being inherited?

static
sealed
final
abstract
None of these

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the difference between const and readonly in C#?

No difference, they are synonyms
const is compile-time constant, readonly is runtime constant
readonly is compile-time constant, const is runtime constant
const can be modified, readonly cannot
None of these

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which collection type is best for frequently adding and removing items from both ends?

List<T>
LinkedList<T>
Queue<T>
Stack<T>
None of these

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the virtual keyword indicate in C#?

The method cannot be overridden
The method can be overridden in derived classes
The method is abstract
The method is static
None of these

Create a free account and access millions of resources

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?