wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

C#_03/12/2021

Total questions: 5

Worksheet time: 3mins

Name
Class
Date
1.

QuocHN1: Which of the following statements is true about an enum used in C#.NET?

a)

An implicit cast is needed to convert from enum type to an integral type.

b)

An enum variable cannot have a public access modifier.

c)

An enum variable cannot have a private access modifier.

d)

An enum variable can be defined inside a class or a namespace.

2.

QuocHN1: Which of the following is the correct output for the C#.NET code snippet given below?

enum color { red, green, blue }

color c;

c = color.red;

Console.WriteLine(c);

a)

1

b)

-1

c)

red

d)

0

3.

QuocHN1: In which of the following collections is the Input/Output index-based?

a)

Stack

b)

ArrayList

c)

HashTable

d)

Queue

4.

QuocHN1: A function returns a value, whereas a subroutine cannot return a value. ?

a)

True

b)

False

5.

QuocHN1: Which of the following is NOT a namespace in the .NET Framework Class Library?

a)

System.Process

b)

System.Security

c)

System.Threading

d)

System.Drawing