Похожие чаты

Https://Pastebin.Com/RRUBJMk7 I wrote this linkedlist code last night and now i

dont understand why i am assigning last->next to link and then last to link.. (line 23-24). if i remove line 23, i get a segfault.
the *last pointer for tracking the last added element and link is the newly appended node. can someone explain??

3 ответов

25 просмотров
skalpasi- Автор вопроса

i know that i wanted to point *last to *link. last->next = link will make the *next pointer point to link node but i cant understand why i did last = link

skalpasi- Автор вопроса

and also when i call clear() function, the head is assigned to NULL and i dont have access to linkedlist but how can i clear all the nodes from heap? do i need to free() them or they get destroyed on their own??

skalpasi
and also when i call clear() function, the head is...

Do you have a whiteboard or paper and pen ? Trace the program flow and you'll understand

Похожие вопросы

Обсуждают сегодня

Господа, а что сейчас вообще с рынком труда на делфи происходит? Какова ситуация?
Rꙮman Yankꙮvsky
29
А вообще, что может смущать в самой Julia - бы сказал, что нет единого стандартного подхода по многим моментам, поэтому многое выглядит как "хаки" и произвол. Короче говоря, с...
Viktor G.
2
@Benzenoid can you tell me the easiest, and safest way to bu.y HEX now?
Živa Žena
20
This is a question from my wife who make a fortune with memes 😂😂 About the Migration and Tokens: 1. How will the old tokens be migrated to the new $LGCYX network? What is th...
🍿 °anton°
2
30500 за редактор? )
Владимир
47
а через ESC-код ?
Alexey Kulakov
29
What is the Dex situation? Agora team started with the Pnetwork for their dex which helped them both with integration. It’s completed but as you can see from the Pnetwork ann...
Ben
1
Гайс, вопрос для разносторонее развитых: читаю стрим с юарта, нада выделять с него фреймы с определенной структурой, если ли чо готовое, или долбаться с ринг буффером? нада у...
Vitaly
9
Anyone knows where there are some instructions or discort about failed bridge transactions ?
Jochem
21
@lozuk how do I get my phex copies of my ehex from a atomic wallet, to move to my rabby?
Justfrontin 👀
11
Карта сайта