Relational expressions

What is the value of each of the following relational expressions? (3, 4)

a. p->link->link == current

b. first->link->link->info == 92

c. temp->link == 0

d. last->link == nullptr

e. list->link == p

f. p->link->link->link->info == temp->info

What are the effects, if any, of each of the following C++ statements? (3, 4)

a. trail = temp->link;

 trail->link = nullptr;

 delete last; last = trail;

b. temp->link = last;

c. first->info = 58;

d. q = current->link; current->link = temp;

 delete q;

e. q = p->link->link->link;

 q->info = 60;

f. p->link = temp;

Posted in Uncategorized

Leave a Reply