wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

C# Concepts and Code Quiz

Total questions: 15

Worksheet time: 8mins

Name
Class
Date
1.

What is the keyword used to import namespaces and libraries in C#?

a)

using

b)

namespace

c)

class

d)

public

2.

Which keyword is used to define a class in C#?

a)

using

b)

namespace

c)

class

d)

public

3.

What is the keyword used to make class members accessible from outside?

a)

public

b)

private

c)

static

d)

void

4.

Which keyword is used to define a method that returns nothing in C#?

a)

void

b)

int

c)

string

d)

bool

5.

What is the keyword used to declare an integer variable in C#?

a)

int

b)

string

c)

bool

d)

if

6.

What is the keyword used to declare a method that does not return a value in C#?

a)

void

b)

public

c)

private

d)

static

7.

What is the keyword used to define a class in C#?

a)

class

b)

public

c)

namespace

d)

using

8.

Which keyword is used to define a constant in C#?

a)

const

b)

static

c)

var

d)

public

9.

Which keyword is used to define a private variable in C#?

a)

private

b)

public

c)

protected

d)

internal

10.

What is the keyword used to declare a boolean variable in C#?

a)

bool

b)

int

c)

string

d)

void

11.

What keyword is used to define a class in C#?

a)

class

b)

public

c)

void

d)

const

12.

What keyword is used to declare a constant in C#?

a)

const

b)

static

c)

public

d)

private

13.

Which keyword is used to define an interface in C#?

a)

interface

b)

class

c)

public

d)

namespace

14.

What is the keyword used to declare a string variable in C#?

a)

string

b)

int

c)

bool

d)

void

15.

Which keyword is used to define a public variable in C#?

a)

public

b)

private

c)

protected

d)

internal