- 2

Module 9 Quiz Q2

what is the answer to Q2 in the module 9 Quiz? ([] spaces for answers required) [] Temp [] { T x; public [] Func() { [] x; } } possible answers: <x>, T, x, class, <T>, static, return

16th Jun 2017, 2:38 PM
Sean O'Connell
Sean O'Connell - avatar
7 Antworten
+ 2
HashSet<int> hs = new HashSet<int>(); for(int x = 1; x <= 5; x++) { hs.Add(x); } Console.Write(hs.Count);
16th Apr 2022, 6:40 PM
Venura Dilshan Siriwardhana
Venura Dilshan Siriwardhana - avatar
+ 1
class Temp <T>{ T x; public T Func() { return x; } }
16th Jun 2017, 3:49 PM
Saeede
Saeede - avatar
+ 1
Answer: Queue<int> q = new Queue<int>(); for (int x = 1; x <= 5; x++) q.Enqueue(x); foreach (int val in q) Console.Write(val + " ");
10th Jan 2020, 7:43 AM
Đào Ngọc Tuấn Anh
Đào Ngọc Tuấn Anh - avatar
- 1
Queue<int> q = new Queue<int>(); for (int x = 1; x <= 5; x++) q.Enqueue(x); foreach (int val in q) Console.Write(val + " ");
21st Jul 2019, 8:03 PM
Sushant Malhotra
Sushant Malhotra - avatar
- 1
Queue<int> q = new Queue<int>(); for (int x = 1; x <= 5; x++) q.Enqueue(x); foreach (int val in q) Console.Write(val + " ");
14th Nov 2019, 5:51 AM
Aarti Rani
Aarti Rani - avatar
- 1
Queue<int> q = new Queue<int>(); for (int x = 1; x <= 5; x++) q.Enqueue(x); foreach (int val in q) Console.Write(val + " ");
24th Apr 2020, 6:27 PM
Palani M
Palani M - avatar
- 3
Module 9 : Quiz Question 3. Reorder the code to declare a Queue of integers, add values 1 through 5 and print the contents of the Queue. Queue<int> q = new Queue<int>(); q.Enqueue(x); for (int x = 1; x <= 5; x++) Console.Write(val + " "); foreach (int val in q)
28th Feb 2019, 11:55 AM
Masingita Mercy Mabasa
Masingita Mercy Mabasa - avatar