Search Header Logo

C# Basics

Authored by Thang Tx

Computers

1st Grade

Used 1+ times

C# Basics
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is C#?

C# is a programming language developed by Microsoft for building a wide range of enterprise applications that run on the .NET Framework.

C# is a type of musical note

C# is a term used in accounting for a specific type of transaction

C# is a new brand of vitamin supplement

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What are the basic data types in C#?

The basic data types in C# include red, blue, green, yellow, purple, and orange.

The basic data types in C# include apple, banana, orange, grape, watermelon, and pineapple.

The basic data types in C# include cat, dog, bird, fish, rabbit, and hamster.

The basic data types in C# include int, float, double, char, bool, and string.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Explain the difference between value types and reference types in C#.

Value types are stored on the heap, while reference types are stored on the stack.

Value types and reference types are stored in the same memory location.

Value types and reference types are interchangeable in C#.

In C#, value types are stored on the stack, while reference types are stored on the heap.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the use of 'using' statement in C#?

The 'using' statement in C# is used to ensure that the resources are properly disposed of, even if an exception occurs.

The 'using' statement in C# is used to define a loop.

The 'using' statement in C# is used to create a new class instance.

The 'using' statement in C# is used to declare a variable.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Explain the concept of inheritance in C#.

Inheritance in C# only allows a class to inherit properties, not behaviors.

Inheritance in C# is not supported and cannot be used.

Inheritance in C# is used to create new instances of a class.

In C#, inheritance allows a class to inherit properties and behaviors from another class. This promotes code reusability and helps in creating a hierarchy of classes.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of 'static' keyword in C#?

To allow a method to be overridden in a derived class

To declare a member that belongs to the type itself, rather than to any specific instance of the type.

To make a variable accessible to all instances of a class

To restrict access to a method within a class

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the difference between 'const' and 'readonly' in C#?

There is no difference between 'const' and 'readonly' in C#.

The 'const' keyword is used to declare a constant value that can be changed at runtime, while the 'readonly' keyword is used to declare a constant value at compile time.

The 'const' keyword is used for variables that can be modified, while the 'readonly' keyword is used for variables that cannot be modified.

The 'const' keyword is used to declare a constant value at compile time, while the 'readonly' keyword is used to declare a constant value that can be assigned at runtime but cannot be changed after assignment.

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?