wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Introduction to .NET Core

Total questions: 20

Worksheet time: 7mins

Name
Class
Date
1.

CLR stands for ___________________

a)

Common Language Runtime

b)

Common Linguistic Runtime

c)

Common Language Realtime

d)

None of the above

2.

When a program is compiled the code is converted into _________

a)

Executable code

b)

Objective code

c)

MSIL

d)

None

3.

Is MSIL is platform dependant?

a)

Yes

b)

No

4.

Identify the incorrect signature of Main() method.

a)

void Main()

b)

static void Main(string[] str)

c)

static void Main(String[] args)

d)

public static void Main()

5.

Which of the following are the values types?

a)

Int32

b)

bool

c)

double

d)

class

6.

Which of the following are the reference types?

a)

Class

b)

Delegate

c)

String

d)

All of the above

7.

Struct in C# is _________________

a)

Value type

b)

Reference Type

c)

Pointer

d)

None of the above

8.

Predict the output of the below code.

class Demo

{

static void Main()

{

Console.Write("Welcome to C#")

}

}

a)

Would display, "Welcome to C#"

b)

Compilation error at line number 3

c)

Compilation error at line number 5

d)

Code will compile but won't display anything

9.

Who will identify the compilation errors in a aprogram?

a)

CLR

b)

Compiler

c)

JIT

d)

None of the above

10.

Is Microsoft .NET a Open source framework

a)

No

b)

Yes

11.

Which method converts the string representation of an integral to its Int32 representation?

a)

parseInt()

b)

ToInt()

c)

parse()

d)

None of the above

12.

Which of the following is not a property of a string?

a)

Strings are mutable

b)

Strings are reference types

c)

Strings have a default value null

d)

Strings are immutable

13.

In a visual studio project, can we have more than one entry point?

a)

Yes

b)

No

14.

Which of the following are the reference types?

a)

int

b)

Delegate

c)

String

d)

Array

15.

Is enum a reference type?

a)

Yes

b)

No

16.

According to CTS all the types in .NET are derived from _________

a)

System.Object

b)

System.ValueType

c)

System.Console

d)

None of the above

17.

The Read() method of Console class does __________

a)

Reads collection of characters from the standard input stream

b)

Reads a character from the standard input stream

c)

Reads a character from the standard input stream till encounters a new like escape sequences

d)

None of the above

18.

The Read() method of Console class

a)

returns collection of characters as string

b)

returns a character

c)

returns the ASCII value of a read character

d)

None of the above

19.

What is the output of the below statement.

int a=10;

int b=20;

Console.WriteLine("Sum is:"+a+b);

a)

Sum is:30

b)

Sum is:10+20

c)

Sum is:1020

d)

Gives compilation error

20.

Does the .NET framework provide language compilers?

a)

Yes

b)

No