Variable Declaration
Data Types
c# Syntax
Reading Code
Output
100

Write a correct variable declaration for a decimal value named price.

double price;

100

What data type is used for storing long decimal numbers? 

double

100

What symbol ends most C# statements?

;

100

What is the output? int x = 3; outputLabel.Text = x.ToString();

3

100

What is one method of outputting information to the user is by this "pop-up" box.

MessageBox

200

What is wrong with this line? 

string first name = "Alex";

Variable names cannot have a space.

200

What keyword is used to declare a variable with a whole number?

int

200

True or False: Every opening brace must have a closing brace at some point later in the program.

True

200

What is the value of total? int a = 4; int b = 6; int total = a + b;

10

200

What is the output? MessageBox.Show("Hello" + " World");

Hello World

300

True or False: Variables must be declared before they are used in C# 

True

300

What data type would best store multiple characters?

String

300

How is a string denoted in code?

""

300

What is the output? int x = 10; x = x + 2; outputLabel.Text = x.ToString();

12

300

What is the output? string name = "Ava"; MessageBox.Show("Hello " + name);

Hello Ava

400

Declare and initialize a variable named age with the value 17.

int age = 17;

400

What data type is used with money? 

decimal

400

What is the correct syntax for a Message Box?

MessageBox.Show("text");

400

What is the output? int x = 2; int y = x * x + 3; outputLabel.Text = y.ToString();

7

400

What is the output? string number = "3"; MessageBox.Show(number + "2");

32

500

What term is used to describe where a variable can be referenced in code?

Scope

500

Which type uses more memory: int or double ? 

double

500

List the organizational tree in C# from most broad to least.

Namespace -> Class -> Method

500

What is the output? int x = 13; int y = 3; int z = x % y; outputLabel.Text = z.ToString(); 

1

500

What method is called to convert a string to a numerical data type?

Parse()

M
e
n
u