Daily Quiz Week 1 Flashcards
Type a C# statement that declares variable myNum as an integer and initializes it to 3.
Note: do not include any spaces before or after your answer and only include one space between the various parts of your answer. For example the following is correct:
bool isReal = true;
while the following is incorrect:
bool isReal=true; <— the problem with this statement is the number of spaces after the bool and there is no single space before and after the equals symbol.
int myNum = 3;
Type a C# statement that declares variable myTaxRate as a double and initializes it to 0.15
Note: Please abide by the space requirements in the first question
double myTaxRate = 0.15;
Type a C# statement that declares variable myGPA as a double and initializes it to 3.75
Note: Please abide by the spaces requirements in the first question
double myGPA = 3.75;
Type a C# statement that declares variable myAge as an integer and does not initialize it to anything.
Note: Please abide by the spaces requirements in the first question
int myAge;
What is the value of variable myNum after the following C# code is executed?
int myNum = 3;
myNum = 4;
4
What is the Hungarian notation for a text box?
txt
What is the Hungarian notation for a label?
lbl
What is the Hungarian notation for a button?
btn
What should be the name of a button called Submit?
btnSubmit
What should be the name of a label called Name?
lblName
What should be the name of a text box called MPG?
txtMPG
What should be the name of a label that displays an address?
lblAddress
Type the line of code that assigns the text Hello to a label called result? Make sure to include one space before and after the equal symbol.
lblResult.Text = “Hello”;
Type the line of code that assigns the words Computer Science to a label called answer? Make sure to include one space before and after the equal symbol.
lblAnswer.Text = “Computer Science”;
What is the line of code that assigns the text Submit to a button called answer? Make sure to include one space before and after the equal symbol.
btnAnswer.Text = “Submit”;