Basic C# intro

Basic C# intro

University

20 Qs

quiz-placeholder

Similar activities

Tools and Shortcut Quiz - BSIS II A

Tools and Shortcut Quiz - BSIS II A

University

20 Qs

Lei de Ohm e redes

Lei de Ohm e redes

University

20 Qs

Quiz 02-Finals-IT 222-FIAS

Quiz 02-Finals-IT 222-FIAS

University

18 Qs

Scratch Pre-knowledge

Scratch Pre-knowledge

3rd Grade - University

15 Qs

2.2 Data Transmission

2.2 Data Transmission

University

18 Qs

Diploma in IT - Computer Savvy Quiz

Diploma in IT - Computer Savvy Quiz

University

15 Qs

Basic C# intro

Basic C# intro

Assessment

Quiz

Information Technology (IT)

University

Practice Problem

Hard

Created by

Raymond Radebe

Used 5+ times

FREE Resource

AI

Enhance your content in a minute

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

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is used for a single-line comment in C#?

/*

//

<!--

/**

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct syntax for a multi-line comment in C#?

/* Comment */

<!-- Comment -->

// Comment //

/* Comment */

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid declaration of a variable in C#?

int 1number;

int number;

var int number;

int = number;

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What type of variable would you use to store the value true or false?

string

int

bool

float

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will happen if a local variable is accessed outside its scope?

It will return a default value.

It will throw a compile-time error.

It will automatically be promoted to a global variable.

It will execute without errors.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which type of conversion does not require explicit casting?

Implicit conversion

Explicit conversion

Typecasting

Parsing

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the output of the following code?

10

10.5

11

compile-time error

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?