Which of the following loops correctly uses iter as an iterator to move through the nodes of the linked list?
NodePtr iter; //a pointer to a node
a. while(iter != NULL)
iter++;
b. while(iter != NULL)
iter=iter->link;
c. for(iter=NULL; iter != NULL; iter=iter->link)
d. for( iter=head; iter != NULL; iter=iter->link)
d. for( iter=head; iter != NULL; iter=iter->link)
Computer Science & Information Technology
You might also like to view...
A static method of a generic class
A) can refer to any of the type parameters of its class B) cannot refer to any of the type parameters of its class C) must specify an upper bound for its type parameters D) None of the above
Computer Science & Information Technology
To create a label with the specified text, use __________.
a. new Labelled(); b. new Label(); c. new Labelled(text); d. new Label(text);
Computer Science & Information Technology