You need to create a method to clear a Queue named q. Which code segment should you use?

You need to create a method to clear a Queue named q. Which code segment should you use?

A. for each (Object^ e in q) {
    q.Dequeue();}
B. for each (Object^ e in q) {
    q.Enqueue(0);}
C. q.Clear();
D. q.Dequeue();

Answer: C

No comments:

Post a Comment