Resetting the null pointer

why in the last line of this pdf has the pointer been assigned the null value? is it required and if not done what are the consequences

hello @vector.9974
pls share the screenshot with me

the last line in this page

after the dynamic memory has been deleted using the delete function, why are we reassigning the value of list which is in the static memory to a null value

@vector.9974
if we dont intialise it will null then it will contain deleted list address which is of no use now .

list=NULL is optional but a good practice to follow.

can the list variable be used for any other job in the whole code

yeah u can again store some other address in it,

ok… thank you sir…