adplus-dvertising

Welcome to the Collection Classes and Mathematical Functions MCQs Page

Dive deep into the fascinating world of Collection Classes and Mathematical Functions with our comprehensive set of Multiple-Choice Questions (MCQs). This page is dedicated to exploring the fundamental concepts and intricacies of Collection Classes and Mathematical Functions, a crucial aspect of C# Programming. In this section, you will encounter a diverse range of MCQs that cover various aspects of Collection Classes and Mathematical Functions, from the basic principles to advanced topics. Each question is thoughtfully crafted to challenge your knowledge and deepen your understanding of this critical subcategory within C# Programming.

frame-decoration

Check out the MCQs below to embark on an enriching journey through Collection Classes and Mathematical Functions. Test your knowledge, expand your horizons, and solidify your grasp on this vital area of C# Programming.

Note: Each MCQ comes with multiple answer choices. Select the most appropriate option and test your understanding of Collection Classes and Mathematical Functions. You can click on an option to test your knowledge before viewing the solution for a MCQ. Happy learning!

Collection Classes and Mathematical Functions MCQs | Page 1 of 5

Explore more Topics under C# Programming

Q1.
Which of the following statements are correct about an ArrayList collection that implements the IEnumerable interface?

1. The ArrayList class contains an inner class that implements the IEnumerator interface.
2. An ArrayList Collection cannot be accessed simultaneously by different threads.
3. The inner class of ArrayList can access ArrayList class's members.
4. To access members of ArrayList from the inner class, it is necessary to pass ArrayList class's reference to it.
5. Enumerator's of ArrayList Collection can manipulate the array.
Discuss
Answer: (b).1 and 3 and 4 only
Q2.
How many enumerators will exist if four threads are simultaneously working on an ArrayList object?

a.

1

b.

3

c.

2

d.

4

Discuss
Answer: (d).4
Q3.
In which of the following collections is the Input/Output index-based?

1. Stack
2. Queue
3. BitArray
4. ArrayList
5. HashTable
Discuss
Answer: (b).3 and 4 only
Q4.
In which of the following collections is the Input/Output based on a key?

1. Map
2. Stack
3. BitArray
4. HashTable
5. SortedList
Discuss
Answer: (d).4 and 5 only
Q5.
In a HashTable Key cannot be null, but Value can be.
Discuss
Answer: (a).True
Q6.
Which of the following statements are correct about the C#.NET code snippet given below?

Stack st = new Stack();
st.Push("hello");
st.Push(8.2);
st.Push(5);
st.Push('b');
st.Push(true);
Discuss
Answer: (d).This is a perfectly workable code.
Q7.
Which of the following statements are correct about the Stack collection?

1. It can be used for evaluation of expressions.
2. All elements in the Stack collection can be accessed using an enumerator.
3. It is used to maintain a FIFO list.
4. All elements stored in a Stack collection must be of similar type.
5. Top-most element of the Stack collection can be accessed using the Peek() method.
Discuss
Answer: (c).1, 2 and 5 only
Q8.
A HashTable t maintains a collection of names of states and capital city of each state. Which of the following is the correct way to find out whether "Kerala" state is present in this collection or not?
Discuss
Answer: (a).t.ContainsKey("Kerala");
Q9.
Which of the following is the correct way to access all elements of the Queue collection created using the C#.NET code snippet given below?

Queue q = new Queue(); 
q.Enqueue("Sachin"); 
q.Enqueue('A'); 
q.Enqueue(false); 
q.Enqueue(38); 
q.Enqueue(5.4);
Discuss
Answer: (a).IEnumerator e;
e = q.GetEnumerator();
while (e.MoveNext())
Console.WriteLine(e.Current);
Q10.
Which of the following is NOT an interface declared in System.Collections namespace?
Discuss
Answer: (d).IDictionaryComparer
Page 1 of 5

Suggested Topics

Are you eager to expand your knowledge beyond C# Programming? We've curated a selection of related categories that you might find intriguing.

Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!