[QCM] – Mise en oeuvre de l’accès aux données

publicitemcppreparation

 

Nombre de questions disponibles : 13

QUESTION NO: 1

You have written the following code segment:

int[] filteredEmployeeIds = employeeIds.Distinct().Where(value => value !=

employeeIdToRemove).OrderByDescending(x => x).ToArray();

Which of the following describes reasons for writing this code? (Choose two.)

  1. To sort the array in order from the highest value to the lowest value.
  2. To sort the array in order from the lowest value to the highest value.
  3. To remove duplicate integers from the employeeIds array.
  4. To remove all integers from the employeeIds array.

Answer: 1,3

 QUESTION NO: 2

 You are running a training exercise for junior developers. You are currently discussing the use of a method that moves the SqlDataReader on to the subsequent record.

Which of the following is the SqlDataReader method that allows for this?

  1. The Read method.
  2. The Next method.
  3. The Result method.
  4. The NextResult method.

Answer: 1

 QUESTION NO: 3

 You have received instructions to create a custom collection for ABC.com. Objects in the collection must be processed via a foreach loop.

Which of the following is TRUE with regards to the required code?

  1. The code should implement the ICollection interface.
  2. The code should implement the IComparer interface.
  3. The code should implement the IEnumerable interface.
  4. The code should implement the IEnumerator interface.

Answer: 3

 QUESTION NO: 4

 You are running a training exercise for junior developers. You are currently discussing the use of LINQ queries.

Which of the following is NOT considered a distinct action of a LINQ query?

  1. Creating the query.
  2. Obtaining the data source.
  3. Creating the data source.
  4. Executing the query.

Answer: 3

QUESTION NO: 5

 You are running a training exercise for junior developers. You are currently discussing a method that Reads data from the specified file. The reads occur at the position specified by the file pointer.

Which of the following is the method being discussed.

  1. The ReadFileEx method.
  2. The OpenFile method.
  3. The ReadFile method.
  4. The OpenEncryptedFileRaw method.
  5. The ReadFileScatter method.

Answer: 3

QUESTION NO: 6

 You have written code that includes the DataContractSerializer class. The code also includes a DataContractSerializer class property that obtains the component used to dynamically map xsi:type declarations to known contract types.

Which of the following is the property included in the code?

  1. The DataContractResolver property.
  2. The DataContractSurrogate property.
  3. The KnownTypes property.
  4. The PreserveObjectReferences property.

Answer: 1

QUESTION NO: 7

 You have written code that includes the DataContractSerializer class. The code also includes a DataContractSerializer class method that establishes whether the XmlReader is positioned on an object that can be deserialized.

Which of the following is the method included in the code?

  1. The WriteObject(XmlWriter) method.
  2. The WriteObject(XmlDictionaryWriter) method.
  3. The IsStartObject(XmlDictionaryReader)method.
  4. The IsStartObject(XmlReader) method.

Answer: 4

QUESTION NO: 8

You are running a training exercise for junior developers. You are currently discussing the DataContractSerializer class.

Which of the following is TRUE with regards to the DataContractSerializer class?

  1. It is used to serialize and deserialize instances of a type into an HTML stream.
  2. It is used to serialize and deserialize instances of a type into an SSL stream.
  3. It is used to serialize and deserialize instances of a type into a TLL stream.
  4. It is used to serialize and deserialize instances of a type into an XML stream.

Answer: 4

 QUESTION NO: 9

You are running a training exercise for junior developers. You are currently discussing the ExtensionMethods class.

Which of the following is TRUE with regards to the ExtensionMethods class?

(Choose all that apply.)

  1. It allows you to add methods to current types by modifying the original type.
  2. Methods of the class are a special kind of static method that is called as if they were instance methods on the extended type.
  3. It allows you to add methods to current types by recompiling.
  4. Methods of the class are a special kind of instance method that is called as if they were static methods on the extended type.
  5. It allows you to add methods to current types without creating a new derived type.

Answer: 2,5

QUESTION NO: 10

You have been tasked with creating an application for ABC.com. You are currently writing code that uses a lambda expression to create an event handler.

Which of the following is TRUE with regards to lambda expressions? (Choose all that apply.)

  1. It is an anonymous function that can contain expressions and statements, and can be used to create delegates or expression tree types.
  2. It is a sequence of one or more operands and zero or more operators that can be evaluated to a single value, object, method, or namespace.
  3. It is a program element that is applied to one or more operands in an expression or statement.
  4. It is an expression of actions taken by the program.

Answer: 1

QUESTION NO: 11

You are running a training exercise for junior developers. You are currently discussing the use of a method that moves the data reader on to the subsequent result, when examining the results of batch Transact-SQL statements.

Which of the following is the SqlDataReader method that allows for this?

  1. The Read method.
  2. The Next method.
  3. The Result method.
  4. The NextResult method.

Answer: 4

QUESTION NO: 12

You are running a training exercise for junior developers. You are currently discussing the use of the HashTable collection type.

Which of the following is TRUE with regards to the HashTable collection type?

  1. It represents a first in, first out (FIFO) collection of objects.
  2. It represents a last in, first out (LIFO) collection of objects.
  3. It represents a collection of key/value pairs that are organized based on the hash code of the key.
  4. It represents a list of objects that can be accessed by index.

Answer: 3

QUESTION NO: 13

You are running a training exercise for junior developers. You are currently discussing the use of a collection type that represents a doubly linked list.

Which of the following is the collection type being discussed?

  1. The List<T>collection type.
  2. The SortedList<T> collection type.
  3. The SortedSet<T> collection type.
  4. The LinkedList<T> collection type.

Answer: 4

Publicités