C# for YP

C# for YP

Professional Development

30 Qs

quiz-placeholder

Similar activities

Ultimate office trivia quiz

Ultimate office trivia quiz

KG - Professional Development

25 Qs

contoh soal AAJI

contoh soal AAJI

Professional Development

25 Qs

U 7 Top Notch 1

U 7 Top Notch 1

Professional Development

26 Qs

Appraisal is Here

Appraisal is Here

Professional Development

27 Qs

UTILITIES - ELEC PT. 1

UTILITIES - ELEC PT. 1

Professional Development

25 Qs

101908/EN100E Life Skills Module IV

101908/EN100E Life Skills Module IV

University - Professional Development

25 Qs

Block Exam November

Block Exam November

Professional Development

25 Qs

BAT Part- I

BAT Part- I

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

Access all questions and much more by creating a free account

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?

Discover more resources for Professional Development