C# Quizz - LC Year 9

C# Quizz - LC Year 9

9th - 12th Grade

10 Qs

quiz-placeholder

Similar activities

Measuring and marking and setting out t

Measuring and marking and setting out t

9th Grade

10 Qs

Careers in Construction

Careers in Construction

9th - 10th Grade

10 Qs

Robótica

Robótica

10th Grade

10 Qs

Visual servoing Robotics

Visual servoing Robotics

12th Grade

10 Qs

IGCSE ICT - Safety and Security

IGCSE ICT - Safety and Security

10th - 12th Grade

7 Qs

The Writing Process 5 steps

The Writing Process 5 steps

9th - 12th Grade

13 Qs

Variables in RobotC

Variables in RobotC

9th - 12th Grade

15 Qs

Media and Information Literacy Test I

Media and Information Literacy Test I

12th Grade

10 Qs

C# Quizz - LC Year 9

C# Quizz - LC Year 9

Assessment

Quiz

Instructional Technology

9th - 12th Grade

Practice Problem

Hard

Created by

Professores IB Lourenço Castanho undefined

Used 7+ times

FREE Resource

AI

Enhance your content in a minute

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

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the difference between Console.Write and Console.WriteLine?

Console.WriteLine moves to the next line.
Console.Write moves to the next line.
Both move to the next line.
Console.WriteLine keeps on the same line.
None

Answer explanation

Console.WriteLine writes and moves to the next line, while Console.Write keeps writing on the same line.

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What is the correct format to name a variable in camel case?

MyVariable
myVariable
My_variable
my_variable
None

Answer explanation

Camel case starts with a lowercase letter, and each new word starts with an uppercase letter.

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of the following is true when using var to initialize variables?

var requires a specific type like int, string.
var is used when the type is unknown.
var cannot store strings.
var can store multiple types of values.
None

Answer explanation

var automatically infers the type of the value it is assigned, such as int, string, or double.

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What will be the output of the following code? Console.WriteLine("Hello\tWorld\n!");

Hello World

!

Hello World
Hello World !
Hello World
None

Answer explanation

The \t adds a tab space and \n moves to the next line.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following methods allows you to concatenate strings in Console.WriteLine?

+ (plus sign)
$ (dollar sign)
& (ampersand)
@ (verbatim symbol)
None

Answer explanation

Concatenation uses + to combine multiple strings. Interpolation uses $.

6.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What will be the output of this code: Console.WriteLine(3 + 2 * 5);

13
25
10
15
None

Answer explanation

The multiplication happens before the addition, following the order of operations (PEMDAS).

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you check if a number is positive or negative using if/else in C#?

if(number > 0)
if(number < 0)
if(number = 0)
if(number >= 0)
None

Answer explanation

The if condition checks if the number is greater than 0 to determine if it's positive.

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

Already have an account?