My question is that what is the effect if I delete a pointer in a linked list by mistake???

What problems will arise and how will I come to know that is a missing pointer that is causing the trouble?

Recommended Answers

All 2 Replies

Is this a question from your assignment??? Anyway, deleting a pointer(node) from a linked list without reconnecting it would cause you to lose all of the data which connect after the deleted node. As a result, memory leak would happen. There is a way to know that by traversing through the list. If you get an error (the next node is not null or end with null), you found the missing node.

yeah I am trying to find out an answer for my assignment at the university.....Thnx for the reply.

I had the samething in mind as you answered.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.