Match the following actions with their purposes in a C# program.
Hello World - C# Quiz Sheet

Quiz
•
Computers
•
11th Grade
•
Easy
Emily Chard
Used 1+ times
FREE Resource
10 questions
Show all answers
1.
MATCH QUESTION
45 sec • 5 pts
Console.Title = "Skynet";
To set the title of the console window
Console.ReadLine();
To write output to the console
Console.WriteLine("Hello World");
To change the text color
Console.ForegroundColor = ConsoleColor.Red;
To read input from the user
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.
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
Unity Interface Basics 101

Quiz
•
9th - 12th Grade
15 questions
Microsoft Word Vocabulary Quiz

Quiz
•
9th - 12th Grade
10 questions
Code Evaluation

Quiz
•
9th - 11th Grade
10 questions
CSP Unit 3 Assessment

Quiz
•
9th - 12th Grade
11 questions
Computer Programming: Graphics

Quiz
•
8th - 11th Grade
10 questions
Python Testing

Quiz
•
9th - 12th Grade
15 questions
Code.org Unit 5 Lesson 15 Assessment

Quiz
•
9th - 12th Grade
14 questions
TechSmart Unit 1 Vocabulary Text

Quiz
•
9th - 11th Grade
Popular Resources on Wayground
25 questions
Equations of Circles

Quiz
•
10th - 11th Grade
30 questions
Week 5 Memory Builder 1 (Multiplication and Division Facts)

Quiz
•
9th Grade
33 questions
Unit 3 Summative - Summer School: Immune System

Quiz
•
10th Grade
10 questions
Writing and Identifying Ratios Practice

Quiz
•
5th - 6th Grade
36 questions
Prime and Composite Numbers

Quiz
•
5th Grade
14 questions
Exterior and Interior angles of Polygons

Quiz
•
8th Grade
37 questions
Camp Re-cap Week 1 (no regression)

Quiz
•
9th - 12th Grade
46 questions
Biology Semester 1 Review

Quiz
•
10th Grade