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
Match the following actions with their purposes in a C# program.
Console.ForegroundColor = ConsoleColor.Red;
To write output to the console
Console.Title = "Skynet";
To set the title of the console window
Console.WriteLine("Hello World");
To read input from the user
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.
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Adobe Premiere Pro Basics

Quiz
•
9th - 12th Grade
10 questions
K11 - Bài 25 GIMP

Quiz
•
11th Grade
10 questions
Simple Easy Basic Lua Quiz

Quiz
•
4th Grade - Professio...
15 questions
FSWI - CH4 T1

Quiz
•
KG - Professional Dev...
12 questions
Digital Media - Chapter 2

Quiz
•
9th - 12th Grade
10 questions
Visual Basic I

Quiz
•
10th - 11th Grade
10 questions
code.org Unit 3 Intro to App Design

Quiz
•
9th - 12th Grade
15 questions
code.org CSP Unit 3 Review 20-21

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade