A) ModifyArray(double[] list)
B) ModifyArray(double[] : list)
C) ModifyArray(double list[])
D) ModifyArray(list)
Correct Answer
verified
Multiple Choice
A) int[] n = {1, 2, 3, 4, 5};
B) array n[int] = {1, 2, 3, 4, 5};
C) int n[5] = {1; 2; 3; 4; 5};
D) int n = new int(1, 2, 3, 4, 5) ;
Correct Answer
verified
Multiple Choice
A) ++arrayName[i]
B) arrayName++[i]
C) arrayName[i++]
D) None of the above.
Correct Answer
verified
True/False
Correct Answer
verified
True/False
Correct Answer
verified
True/False
Correct Answer
verified
Multiple Choice
A) IndexRangeError
B) SubscriptException
C) IndexOutOfRangeException
D) SubscriptRangeError
Correct Answer
verified
Multiple Choice
A) Result is: 280
B) Result is: 154
C) Result is: 286
D) Result is: 332
Correct Answer
verified
Multiple Choice
A) Prior to C# 6,auto-implemented properties required both a get and a set accessor.
B) Client code can use C# 6 getter-only auto-implemented properties only to get each property's value.
C) C#6 getter-only auto-implemented properties are read only.
D) C#6 getter-only auto-implemented properties can be initialized only in their declarations.
Correct Answer
verified
Multiple Choice
A)
values[3] = values[4];
values[4] = values[3];
B)
values[4] = values[3];
values[3] = values[4];
C)
int temp = values[3];
values[3] = values[4];
values[4] = temp;
D)
int temp = values[3];
values[3] = values[4];
values[4] = values[3];
Correct Answer
verified
True/False
Correct Answer
verified
Multiple Choice
A) When the runtime or a method detects a problem, such as an invalid array index or an invalid method argument, it throws an exception-that is, an exception occurs.
B) Exceptions are always thrown by the runtime.
C) To handle an exception, place any code that might throw an exception in a try statement.
D) The try block contains the code that might throw an exception, and the catch block contains the code that handles the exception if one occurs.
Correct Answer
verified
Multiple Choice
A) It always passes the element as a reference automatically.
B) Use the keyword ref and/or out.
C) All of the above.
D) None of the above, passing in by reference of an array element is only possible if the array type is a reference type.
Correct Answer
verified
Multiple Choice
A) Creates a double array containing 13 elements.
B) Creates a double array containing 14 elements.
C) Creates a double array containing 15 elements.
D) Declares but does not create a double array.
Correct Answer
verified
True/False
Correct Answer
verified
Multiple Choice
A) foreach (numbers)
B) foreach (number in numbers)
C) foreach (int number in numbers)
D) foreach (int number in int[] numbers)
Correct Answer
verified
Multiple Choice
A) The new keyword should be used to create an array.
B) When an array is created, the number of elements must be placed in square brackets following the type of element being stored.
C) The elements of an array of integers have a value of null before they are initialized.
D) A for loop is an excellent way to initialize the elements of an array.
Correct Answer
verified
True/False
Correct Answer
verified
Multiple Choice
A) Result is: 62
B) Result is: 64
C) Result is: 65
D) Result is: 67
Correct Answer
verified
Multiple Choice
A) (foreach type_identifer in arrayName)
B) foreach (arrayName)
C) foreach (type_identifer in arrayName)
D) None of the above.
Correct Answer
verified
Showing 21 - 40 of 90
Related Exams