Deck 11: Introduction to Linq

Full screen (f)
exit full mode
Question
You can chain LINQ queries by having one query operate on the results of another.
Use Space or
up arrow
down arrow
to flip the card.
Question
Which of the following returns the number of items in LINQ query result q?

A)q.Length
B)q.Size
C)q.getUpperBound
D)q.Count
Question
If the condition in the Where clause evaluates to True,the element is selected (included in the query results).
Question
LINQ's Order By clause can __________ objects in the result according to multiple properties specified in a comma-separated list.

A)merge
B)total
C)sort
D)search
Question
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 data type
Question
Types that implement interface IComparable provide a CompareTo method that returns a negative,zero or positive value indicating whether one value is greater than,equal to or less than another value,respectively.
Question
LINQ works with arrays because they implement the IEnumerable interface.
Question
Selecting elements that satisfy a set of conditions is known as __________.

A)distilling
B)filtering
C)purifying
D)refining
Question
The For Each…Next statement is useful for iterating over IEnumerable objects.
Question
The Order By clause sorts the query results in descending order by default.
Question
The __________extension method returns the number of elements in an IEnumerable object.

A)Count
B)Size
C)Length
D)Total
Question
___________ is an international standard used with relational databases to perform queries and to manipulate data.

A)APL
B)RDB
C)LDL
D)SQL
Question
LINQ to Objects works with objects that implement the __________ interface,which enables a program to iterate over a collection of data.

A)ICountable
B)IEnumerable
C)IRepeatable
D)ICompare
Question
In a LINQ query,the From clause specifies a range variable and the data source to query.The range variable represents each item in the data source.
Question
LINQ enables you to write queries,similar to SQL,that retrieve information from a wide variety of data sources,but LINQ's syntax is built into Visual Basic.
Question
The Visual Studio IDE provides IntelliSense support for LINQ queries.
Question
A database management system (DBMS)provides mechanisms for storing,organizing,retrieving and modifying data contained in the database.
Question
A LINQ query returns an IEnumerable object.
Question
LINQ's Order By clause supports values of any type that implements the interface__________,such as the primitive numeric types and String.

A)ICompare
B)ICompareTo
C)IComparable
D)ISort
Question
The range variable is implicitly defined in the _____ clause and used to produce results in the ______ clause

A)Where,Put
B)From,Put
C)From,Select
D)Where,Select
E)In,For Each
Question
With LINQ any Integer expression can be used in a Where clause.
Question
Most LINQ capabilities are defined as constructor methods for the IEnumerable interface.You can call these on any IEnumerable object.
Question
LINQ uses a technique called __________-a query executes only when you iterate over the results,not when the query is defined.This allows you to create a query once and execute it many times.

A)late binding
B)dynamic binding
C)iteration delay
D)deferred execution
Question
LINQ infers the type of a range variable based on the query's data source.
Question
The __________ clause prevents duplicate values from appearing in the query results.

A)Unique
B)Exclusive
C)Different
D)Distinct
Question
With LINQ,the IDE provides full IntelliSense support for the anonymous types generated by the compiler.
Question
String method __________determines whether a String starts with the String in the method's argument.

A)Front
B)StartsWith
C)First
D)Leading
Question
String method __________ returns a String with uppercase letters.

A)Upper
B)Uppercase
C)ConvertToUpper
D)ToUpper
Question
The Select clause can be used to transform the values in a query result.
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/29
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 11: Introduction to Linq
1
You can chain LINQ queries by having one query operate on the results of another.
True
2
Which of the following returns the number of items in LINQ query result q?

A)q.Length
B)q.Size
C)q.getUpperBound
D)q.Count
q.Count
3
If the condition in the Where clause evaluates to True,the element is selected (included in the query results).
True
4
LINQ's Order By clause can __________ objects in the result according to multiple properties specified in a comma-separated list.

A)merge
B)total
C)sort
D)search
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
5
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 data type
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
6
Types that implement interface IComparable provide a CompareTo method that returns a negative,zero or positive value indicating whether one value is greater than,equal to or less than another value,respectively.
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
7
LINQ works with arrays because they implement the IEnumerable interface.
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
8
Selecting elements that satisfy a set of conditions is known as __________.

A)distilling
B)filtering
C)purifying
D)refining
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
9
The For Each…Next statement is useful for iterating over IEnumerable objects.
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
10
The Order By clause sorts the query results in descending order by default.
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
11
The __________extension method returns the number of elements in an IEnumerable object.

A)Count
B)Size
C)Length
D)Total
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
12
___________ is an international standard used with relational databases to perform queries and to manipulate data.

A)APL
B)RDB
C)LDL
D)SQL
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
13
LINQ to Objects works with objects that implement the __________ interface,which enables a program to iterate over a collection of data.

A)ICountable
B)IEnumerable
C)IRepeatable
D)ICompare
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
14
In a LINQ query,the From clause specifies a range variable and the data source to query.The range variable represents each item in the data source.
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
15
LINQ enables you to write queries,similar to SQL,that retrieve information from a wide variety of data sources,but LINQ's syntax is built into Visual Basic.
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
16
The Visual Studio IDE provides IntelliSense support for LINQ queries.
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
17
A database management system (DBMS)provides mechanisms for storing,organizing,retrieving and modifying data contained in the database.
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
18
A LINQ query returns an IEnumerable object.
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
19
LINQ's Order By clause supports values of any type that implements the interface__________,such as the primitive numeric types and String.

A)ICompare
B)ICompareTo
C)IComparable
D)ISort
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
20
The range variable is implicitly defined in the _____ clause and used to produce results in the ______ clause

A)Where,Put
B)From,Put
C)From,Select
D)Where,Select
E)In,For Each
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
21
With LINQ any Integer expression can be used in a Where clause.
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
22
Most LINQ capabilities are defined as constructor methods for the IEnumerable interface.You can call these on any IEnumerable object.
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
23
LINQ uses a technique called __________-a query executes only when you iterate over the results,not when the query is defined.This allows you to create a query once and execute it many times.

A)late binding
B)dynamic binding
C)iteration delay
D)deferred execution
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
24
LINQ infers the type of a range variable based on the query's data source.
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
25
The __________ clause prevents duplicate values from appearing in the query results.

A)Unique
B)Exclusive
C)Different
D)Distinct
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
26
With LINQ,the IDE provides full IntelliSense support for the anonymous types generated by the compiler.
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
27
String method __________determines whether a String starts with the String in the method's argument.

A)Front
B)StartsWith
C)First
D)Leading
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
28
String method __________ returns a String with uppercase letters.

A)Upper
B)Uppercase
C)ConvertToUpper
D)ToUpper
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
29
The Select clause can be used to transform the values in a query result.
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 29 flashcards in this deck.