Expert Answers


CLICK HERE TO DOWNLOAD THIS ANSWER  INSTANTLY $17 Only


You can initialize an array by enclosing a list of comma-separated values within:
A. curly braces.
B. quotation marks.
C. commas.
D. square brackets
You can declare an array and supply it with comma-separated values to immediately populate it with data. This is called an array:
A. declaration.
B. resize.
C. checklength.
D. initializer
Which of the following statements about arrays are TRUE?
A. An array is a group of variables that all have the same type.
B. Elements are located by index or subscript.
C. The length of an array c is determined by the expression c.Length.
D. The zeroth element of array c is specified by c[ 0 ]
A. A, C, D.
B. A, B, D.
C. C, D.
D. A, B, C, D.
A __________ array can have varying lengths of data in each row.
A. rectangular
B. tabular
C. jagged
D. varying
Arrays are __________ data structures.
A. constant
B. dynamic
C. static
D. None of the above
The catch block must specify the type of __________ that is to be captured in the event of an error.
A. try
B. throw
C. exception
D. message
Although arrays are fixed in size once created, C# does offer the ability to change the length of an array by copying existing values to a new array. The method to do this is the __________ method of the array class.
A. redeclare
B. resize
C. checklength
D. initializer
Which statement below initializes array items to contain 3 rows and 2 columns?
A. int[,] items = { { 2, 4 }, { 6, 8 }, { 10, 12 } };
B. int[,] items = { { 2, 6, 10 }, { 4, 8, 12 } };
C. int[,] items = { 2, 4 }, { 6, 8 }, { 10, 12 };
D. int[,] items = { 2, 6, 10 }, { 4, 8, 12 };
Arrays that store other arrays are called __________ arrays.
A. multiargument
B. multi-indice
C. multidimensional
D. multilateral
An array stores a number of items. Each individual variable in the group is referred to as a(n):
A. element.
B. index.
C. length.
D. initial value.
To reference a value in a particular position number of an item in an array, we supply the item’s:
A. element.
B. index.
C. length.
D. initial value.
To receive arguments of varying length for a method, the programmer can use the __________ keyword in the method declaration.
A. params
B. args
C. string
D. array
When not looking to use a counter-controlled loop, the programmer can use the __________ statement to iterate through each item in an array.
A. for
B. foreach
C. forwhile
D. if
Arrays may have __________ dimensions.
A. one
B. two
C. more than two
D. All of the above
When an invalid index is supplied for an array, a(n) __________ exception type is thrown.
A. IndexOutOfRangeException
B. InvalidRangeException
C. Exception
D. ParameterException
Consider the array:

“ s[ 0 ] = 7
s[ 1 ] = 0
s[ 2 ] = -12
s[ 3 ] = 9
s[ 4 ] = 10
s[ 5 ] = 3
s[ 6 ] = 6
The value of s[ s[ 6 ] - s[ 5 ] ] is:
A. 0
B. 3
C. 9
D. 0
Arrays consist of related data items that are of the __________ data type.
A. same
B. array
C. int
D. string
Local variables can be implicitly typed by replacing their type with keyword:
A. type.
B. unk.
C. dim.
D. var.
Consider the following line of code. If you wanted to access the first item stored in the array, what value should x be?
a = b[x];
A. 0
B. 1
C. –1
D. Math.Sqrt(b.;
When an exception occurs, the compiler is said to __________ an exception.
A. try
B. throw
C. accept
D. reject
When using generic classes, the __________ method will append an object to the end of the list.
A. Update
B. Insert
C. Add
D. Append
A let clause is used to create a:
A. method within a LINQ query.
B. subquery.
C. new range variable.
D. None of the above
Most LINQ queries return objects of the __________ interface, allowing the compiler to iterate and interact with the dynamic result set that is populated at runtime.
A. IEnumerable
B. IE
C. List
D. Object
The __________ extension method will return true or false based on whether there is at least one element in the LINQ query's result.
A. Count
B. Any
C. Distinct
D. Anonymous
The __________ clause in a LINQ query will sort the results in an ascending or descending fashion.
A. var
B. from
C. select
D. orderby
The __________ extension method returns the number of results in a LINQ query.
A. Any
B. First
C. Count
D. None of the above
LINQ queries only execute when you attempt to access the results in your program. This is known as LINQ's __________ execution.
A. deferred
B. inferred
C. stored
D. in-memory

The collection class __________ of the System.Collection.Generic namespace resizes at execution time, allowing you to add, remove, and replace items without worrying about expanding or collapsing the number of elements in the collection.
A. Interface
B. IE
C. Object
D. List
LINQ stands for Language INtegrated:
A. Quotient.
B. Query.
C. Quartet.
D. Queriables.
A LINQ query's __________ clause determines what value appears in the results of the query.
A. var
B. from
C. select
D. orderby
A LINQ query's __________ clause specifies the query's range variable and the data source to query.
A. var
B. from
C. select
D. orderby
A LINQ query's __________ clause specifies the query's range variable and the data source to query.
A. var
B. from
C. select
D. orderby
When choosing only certain properties of a collection of objects, each object in the LINQ result is a(n) __________ type.
A. Count
B. Any
C. Distinct
D. Anonymous
LINQ uses a practice called __________ programming, whereby data are filtered to satisfy the desired criteria.
A. declarative
B. list
C. imperative
D. initializer
The __________ extension method can be used to limit duplicate elements in a LINQ query’s results, ensuring that all elements in the result set are unique.
A. Count
B. Any
C. Distinct
D. Anonymous
When writing a LINQ query, the compiler can infer the query's data type by using the __________ keyword to declare a variable.
A. var
B. from
C. select
D. orderby
You can determine how many elements are in a LINQ query's results by using the __________ extension method.
A. Count
B. Any
C. Distinct
D. Anonymous
In a LINQ query, the where clause specifies:
A. the data source.
B. where to put the data.
C. the condition(s) for including the item.
D. the Location property.
The __________ extension method is typically used to determine whether a LINQ query’s results are non-empty.
A. Any
B. First
C. Count
D. Static
A LINQ query’s __________ clause can be used to create new anonymous types or new objects of existing types.
A. put
B. from
C. select
D. where
Collections of type List can hold objects of what type?
A. Only other lists
B. Only integers
C. Objects of any one type
D. None of the above