Note 1

Take Note:

Take a note while surfing.





Note With Ink

Give your Note a Colorful Tag.




Easy to Access

Stay on same information and in Sync wherever you are.

Note 2

Take Note:

Organize your information,It may take Shape.





Think With Ink

Differ your Content by Color.




Easy to Access

Easy to pull up your content from anywhere anytime.

Note 3

Take Note:

Don't Let information to miss,Because it take shape





Note With Ink

Simple an Easy Way to take a note.




Easy to Access

Get the same in next visit.

Data Structures :: Linked Lists

Home > Data Structures > Linked Lists > General Questions

11. For a doubly linked list does the following segment
of code removes the element pointed to by X , if it is
assumed that X points to neither the first nor the last
element in the list.
X->prev->next = X->next;
X->next->prev = X->prev; ?

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

12. Analyse this structure and choose the correct option.

typedef struct node_s
{
struct node_s * prev;
struct node_s * next;
} node_t ; ?

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option D

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

13. The following while loop is to remove duplicates
from an existing list having a head pointer pointing
to the first node.Which code will replace ____

current=head;
while(current->next!=NULL)
{
if (current->data == current->next->data)
{
____
}
else
{
current = current->next;
}
} ?

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option D

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

14. "p" and "q" are pointers to a node of the linked list,
"head" points to the first node of the list, "next"
points to the next node in the list, which of the
following is true for the following piece of code:

for (p=head, q = head; p!=NULL ;q = p)
{ p = p->next;
free(q);
} ?

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

15. What does the following function return, if q contains the address of the first element?

int function(NODE *q)
{
int c = 0;
while( q != NULL)
{
q = q->link;
c++;
}
return (c);
} ?

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option D

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option D

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

17. The situation when in a linked list START=NULL is

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option D

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option B

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option B

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!