State whether each of the following is true or false. If false, explain why. a) Functional programmings

Question:

State whether each of the following is true or false. If false, explain why.

a) Functional programming’s filter, map and reduce operations correspond to the IEnumerable extension methods Where, Select and Aggregate.

b) A Hashtable stores key–value pairs.

c) A class implementing interface IEnumerator must define only methods MoveNext and Reset, and no properties.

d) A SortedDictionary can contain duplicate keys.

e) A LinkedList can contain duplicate values.

f) Dictionary is an interface.

g) Enumerators can change the values of elements but cannot remove them.

h) With hashing, as the load factor increases, the chance of collisions decreases.

i) Elements in an array must be sorted in ascending order before a BinarySearch may be performed.

j) Class Array provides static method Sort for sorting array elements.

k) A hash table is one way to implement a dictionary.

l) The ?. operator determines whether an array or collection is null before accessing an element of the array or collection. 

m) A lambda expression begins with a parameter list and is followed by the => lambda operator and an expression that represents the lambda’s body.

n) An expression lambda contains a statement block—one or more statements enclosed in braces ({})—to the right of the lambda operator.

o) The parentheses surrounding a lambda’s parameter list are optional.

p) A key aspect of functional programming is immutability—not modifying the data source being processed or any other program state, such as counter-control variables in loops. This eliminates common errors that are caused by modifying data incorrectly.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Visual C# How to Program

ISBN: 978-0134601540

6th edition

Authors: Paul J. Deitel, Harvey Deitel

Question Posted: