Hello World - C# Quiz Sheet

Hello World - C# Quiz Sheet

11th Grade

10 Qs

quiz-placeholder

Similar activities

C# 101 Mid-Semester Review

C# 101 Mid-Semester Review

9th - 12th Grade

12 Qs

CSP Unit 3 Assessment

CSP Unit 3 Assessment

9th - 12th Grade

10 Qs

Code.org Unit 5 Lesson 15 Assessment

Code.org Unit 5 Lesson 15 Assessment

9th - 12th Grade

15 Qs

Unity Interface Basics 101

Unity Interface Basics 101

9th - 12th Grade

15 Qs

Progamming - Java Syntax

Progamming - Java Syntax

11th - 12th Grade

15 Qs

C#

C#

11th Grade

10 Qs

code.org CSP Unit 3 Review 20-21

code.org CSP Unit 3 Review 20-21

9th - 12th Grade

15 Qs

Hello World - C# Quiz Sheet

Hello World - C# Quiz Sheet

Assessment

Quiz

Computers

11th Grade

Easy

Created by

Emily Chard

Used 1+ times

FREE Resource

10 questions

Show all answers

1.

MATCH QUESTION

45 sec • 5 pts

Match the following actions with their purposes in a C# program.

Console.WriteLine("Hello World");

To read input from the user

Console.ForegroundColor = ConsoleColor.Red;

To write output to the console

Console.Title = "Skynet";

To set the title of the console window

Console.ReadLine();

To change the text color

2.

MULTIPLE CHOICE QUESTION

45 sec • 5 pts

Which method is used to read a line of input from the console in C#?

Console.WriteLine()

Console.ReadLine()

Console.ReadKey()

Console.Write()

3.

MULTIPLE CHOICE QUESTION

45 sec • 5 pts

What does 'Console.ForegroundColor = ConsoleColor.Green;' do in the program?

Sets the background color to green

Sets the text color to green

Sets the window height

Sets the console title

4.

MULTIPLE CHOICE QUESTION

45 sec • 5 pts

In the code, what is the purpose of 'Console.WindowHeight = 40;'?

To set the width of the console window

To set the height of the console window

To set the title of the console window

To set the color of the console text

5.

MULTIPLE CHOICE QUESTION

45 sec • 5 pts

What is the output of 'Console.WriteLine("Hello, what's your name?");'?

It reads the user's name

It writes 'Hello, what's your name?' to the console

It changes the console color

It sets the console title

6.

MULTIPLE CHOICE QUESTION

45 sec • 5 pts

What is the function of 'Console.ReadKey();' in the program?

To read a line of input

To wait for a key press

To write output to the console

To change the text color

7.

DRAG AND DROP QUESTION

45 sec • 5 pts

(a)   is a method in the C# program.

Console.WindowHeight
Console.ForegroundColor
Console.ReadLine()
Console.Title

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?