In the following code snippet, identify the purpose and functionality of the add() function. Explain in detail,
Fantastic news! We've Found the answer you've been seeking!
Question:
In the following code snippet, identify the purpose and functionality of the add() function. Explain in detail, each statement of the add() function and its effect.
void add(int position, int value) { node* temp = start; node* in = new node; for(int i=0; inext; } in->data = value; in->next = temp->next; temp->next = in; in->prev = temp; 2 if(in->next != NULL){ temp = in->next; temp->prev = in; } }
Related Book For
Microsoft Visual C# An Introduction to Object-Oriented Programming
ISBN: 978-1337102100
7th edition
Authors: Joyce Farrell
Posted Date: