Does setting a pointer to NULL affect original item you were pointing at?

ساخت وبلاگ

Vote count: 0

I have a pointer to a node in a linked list:

struct node *temp = head.next

If I set this pointer to NULL such as:

temp = NULL;

will this also affect the node I was pointing to? i.e. head.next is now NULL?

asked 1 min ago

1 Answer

Vote count: 0

will this also affect the node I was pointing to? i.e. head.next is now NULL?

No.


answered 24 secs ago

back soft...
ما را در سایت back soft دنبال می کنید

برچسب : نویسنده : استخدام کار backsoft بازدید : 51 تاريخ : سه شنبه 10 فروردين 1395 ساعت: 12:12

خبرنامه