Basic C# Programming Quiz

Basic C# Programming Quiz

9th Grade

16 Qs

quiz-placeholder

Similar activities

Revision

Revision

9th Grade

17 Qs

Համակարգչային ընդհանուր գիտելիքներ

Համակարգչային ընդհանուր գիտելիքներ

9th Grade

14 Qs

Inputs and Variables

Inputs and Variables

9th - 11th Grade

12 Qs

Python Quiz 2

Python Quiz 2

9th Grade

20 Qs

Unit-1 Computational Thinking

Unit-1 Computational Thinking

9th - 12th Grade

20 Qs

Lesson Plan 2.2

Lesson Plan 2.2

9th - 12th Grade

16 Qs

C++ Arrays

C++ Arrays

8th - 12th Grade

12 Qs

INTRODUCCIÓN A LOS ALGORITMOS

INTRODUCCIÓN A LOS ALGORITMOS

9th - 12th Grade

20 Qs

Basic C# Programming Quiz

Basic C# Programming Quiz

Assessment

Quiz

Computers

9th Grade

Medium

Used 3+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

16 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the correct way to declare an integer variable in C#?

int number;

integer number;

num number;

var number = "int";

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the default value of a string variable in C# if it is not initialized?

0

null

""

"undefined"

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which data type would you use to store a value like 3.14 in C#?

int

string

double

bool

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code? ```csharp int x = 5; int y = 2; Console.WriteLine(x + y); ```

7

52

3

10

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid way to assign a value to a property named `Text` of a label called `label1` in a Windows Form?

label1.Text = "Hello";

label1->Text = "Hello";

label1.text("Hello");

label1.Text: "Hello";

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to declare a variable whose value cannot be changed after initialization in C#?

static

const

var

readonly

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to convert an integer variable `num` to a string in C#?

num.ToString();

ToString(num);

string(num);

num.toString;

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?