"For LogicPro 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