Search Header Logo

C# Basics and Operations

Authored by Rodrigo Calapan

Professional Development

Professional Development

C# Basics and Operations
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to declare a variable in C#?

var age;

string age = 25;

float age;

int age;

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid data type in C#?

char*

int

string[]

float

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What operator is used for addition in C#?

/

*

+

-

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you declare a function in C#?

public returnType functionName(parameterType parameterName) { // function body }

functionName(parameterType parameterName) { // function body }

public functionName(parameterType) { // function body }

returnType functionName(parameterType parameterName)

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the default value of an integer variable in C#?

1

null

-1

0

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

static

final

immutable

const

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of 5 / 2 in C#?

2

1

2.5

3

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