Now suppose further that p1 points to a node of type N in the middle of a linked list (neither the first nor the last node). Write code that deletes the node after the node p1 points to in the linked list. After the code is executed, the linked list should be the same, excepting the specified node is missing.
Suppose you have the following struct definition and typedef statements in your program:```
struct N
{
double d;
N *next;
};
typedef N* node_ptr;
node_ptr head, p1, p2;
```
```
node_ptr delete_me;
delete_me = p1->next; // delete_me points to the node
//to be deleted
p1->next = delete_me->next;
// node is removed from the list,
//but memory has not been
//deallocated
delete delete_me;
// memory has been recycled
```
You might also like to view...
What are the two aspects of the quality assurance process?
A. Product assurance and process assurance B. Product testing and process assurance C. Product assurance and process verification D. Product testing and process verification
A __________ cipher is one in which a block of plaintext is treated as a whole and used to produce a ciphertext block of equal length.
A) ?bit ? B) ?product ? C) ?stream D) ?block