Assuming a linked list of n nodes, the C++ statements

Node *cur = head;
while (cur != null)
{ cout << curr->item << endl;
cur = cur->next;
} // end while
require ______ comparison(s).

a. n
b. n – 1
c. n + 1
d. 1


c. n + 1

Computer Science & Information Technology

You might also like to view...

Case-based Critical Thinking QuestionsCase 11-2Clarisa is tracing through her XML code to find syntax errors. Clarisa next checks all of the attribute names. Which of the following is an invalid attribute name?

A. xml_type B. _type C. itemName D. NAME

Computer Science & Information Technology

The primary reason to use standard menu items, such as File, Edit, and Help is ______.

a. these are built into Visual Basic b. they are the only items that Visual Basic allows you add to a menu c. all the examples in the book are set up this way d. most users expect to see these items

Computer Science & Information Technology

Calculating the actual throughput of a data communication network is:

a. not normally required for synchronous networks because they are so fast b. complex because many factors affect throughput c. simple because packet size is the primary factor affecting throughput d. not needed for satellite-based networks e. far less complicated if the system operates on a contention basis

Computer Science & Information Technology

If a PC on an Ethernet network attempts to communicate with a host on a different subnet, what destination IP address and destination MAC address will be placed in the packet/frame header sent by the PC?

a. Dest. IP: IP address of default gateway. Dest. MAC: MAC address of default gateway. b. Dest. IP: IP address of remote host. Dest. MAC: MAC address of default gateway. c. Dest. IP: IP address of remote host. Dest. MAC: MAC address of remote host. d. Dest. IP: IP address of remote host. Dest. MAC: MAC address of local PC.

Computer Science & Information Technology