C. When you have two or more methods with the same name and different signatures
Which of the following method headers takes no parameters and does not return a value?
C. public static void MyMethod()
Which of the following lines of code will correctly call on the void method named Unknown, which takes no parameters?
B. Unknown();
If you need to get two values back from a method, what can you do?
C. Write a void method and pass the variables by reference.
If you want to allow a method to change the contents of a variable, how do you need to pass it?
B. By reference
Which of the following is the inequality relational operator?
C. !=
Which of the following statements is true regarding the And logical operator?
B. For an expression with the And operator to result in true, both conditions must evaluate to true
In C#, all of your conditions must evaluate to which of the following?
D. True or false
Which of the following statements regarding the selection structure is true?
B. To use a selection statement, you can have an if statement without an else clause
Which of the following if statements is the same as the following? if (!(a==b))
A. if (a!=b)
Which of the following function calls will correctly test the string variables s1 and s2 to see if they are the same?
C. String.Compare(s1, s2)
Which of the following functions calls will correctly test the string variables 's1' and 's2' to see if they contain the same letters, ignoring their case (uppercase letters are treated as being equal to lowercase letters)?
B. String.Compare(s1, s2, true)
Which of the following is correct regarding nested if statements
C. You can put an if statement either the true or false path of another if statement
If the expression used in the switch statement is the int variable name 'age,' which of the following case clauses is valid?
A. case 9
Which keyword is used to direct the computer to a group of code to be executed if non of the other cases match in a switch statement?
B. default
Which of the following while statements will stop the loop when the value in the number variable is greater than the number 20?
D. while(number <=20)
What is displayed after executing the following code statement?
for(a = 1; a < 5; a++)
Console.Out.Write(a);
C. 1234
Which loop structure would be best for a program that will calculate the sum of the first 100 integers?
B. A for loop
What is the term used to describe a value that signals the computer to stop the loop?
A. A sentinel value
What kind of variable used in a loop is usually updated by a value that varies?