C# for YP

C# for YP

Professional Development

30 Qs

quiz-placeholder

Similar activities

Scholarship Test for Bank Exam/SSC/Railway (STBE- 2024)

Scholarship Test for Bank Exam/SSC/Railway (STBE- 2024)

Professional Development

30 Qs

core java 2

core java 2

Professional Development

25 Qs

Ivy-Predictive Modeling using Python Assessment

Ivy-Predictive Modeling using Python Assessment

Professional Development

29 Qs

Sound Engineering Mock Exam

Sound Engineering Mock Exam

Professional Development

25 Qs

Web Application Pre-Test Under Cyber Closet Project

Web Application Pre-Test Under Cyber Closet Project

Professional Development

25 Qs

NEP 2020

NEP 2020

University - Professional Development

25 Qs

CA FOUNDATION BCK CHAP 2

CA FOUNDATION BCK CHAP 2

Professional Development

30 Qs

Mapscript Day 5 Quiz

Mapscript Day 5 Quiz

KG - Professional Development

35 Qs

C# for YP

C# for YP

Assessment

Quiz

Professional Development

Professional Development

Medium

Created by

Dotnet Quiz

Used 2+ times

FREE Resource

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
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?