No student devices needed. Know more
6 questions
string[] animal = new string[]{"lion", "tiger","zebra","elephant"};
What is the value of animal[2];
lion
tiger
zebra
elephant
What is happening here:
double number1 = double.Parse(textBox1.Text);
A text box is being created.
The value of the textbox is being converted to a double.
The textbox is being set to the value of the variable.
An integer is being parsed.
The following is and example of a(n):
private void button1_Click(object sender, EventArgs e)
{
// Do something here.
}
Function
Event Handler
Method
Button
What statement is true about the following class?
class ScientificCalculator : Calculator
{
public double expo(double num1, double num2)
{
double total = num1;
for(int i = 1;i < num2;i++)
{total = total * num1;}
return total;
}
}
It contains an array variable.
It contains an addition method.
Its name is Calculator.
It inherits from a Calculator class.
The following statement does what?
label1.Text = total.ToString();
Sets the value of a String.
Sets the value of a word.
Sets the text value of a label.
Creates a new label.
The following code generates what:
int i = 7;
if ( i <= 7)
{MessageBox.Show("Hi");}
else
{MessageBox.Show("Bye");}
A message box that says "Bye".
A console output "Hi".
A message box that says "Hi"
A console output that says "Bye"
Explore all questions with a free account