Linked List – Implementation in C/C++

See complete series on linked list here:
http://www.youtube.com/watch?v=NobHlGUjV3g&list=PL2_aWCzGMAwI3W_JlcBbtYTwiQSsOTa6P&index=3
In this lesson, we will see implementation of basic insertion and traversal of a linked list.

Lesson on Dynamic memory allocation (malloc, new etc) –
http://www.youtube.com/watch?v=_8-ht2AKyH4

Series on pointers in C/C++:
http://www.youtube.com/playlist?list=PL2_aWCzGMAwLZp6LMUKI3cc7pgGsasm2_

Drop your questions/queries in comments section.

mycodeschool on facebook : http://www.facebook.com/MyCodeSchool

Comments

Madhusudan Shah says:

you explain things in a very good manner, the only problem that I faced was that you tend to explain things in both c++ and c..this kind of breaks the concentration for the viewer as he might not knw(not be interestd in either of the one) anything abt either c or may be c++..

Kshitij Vengurlekar says:

7:37 We use Arrow operator in C right?

Roman Shrestha says:

can u please implement the linked list in java ??

Kash TECHFREAK says:

ur video and point of explaination are nigger(awasome) but dude pixels in ur videos are tearing apart plz fix this if still u were to star i would have given 4 /5 one taken only for video error

Naimish Kulkarni says:

Why can’t we have integer pointer in struct node?

AYBIN. V. K says:

Thanks…..

Akash S says:

Amazing channel for programming. You should post more videos….

Bahar Munir Khalil says:

Really helpful video, you explained it very well as a well qualified trained teacher, especially with the touch of C, although I dont know the abc of C but it did work towards evolving the concept towards Cpp. Thanks

Alex Mathai says:

You are a fantastic teacher! The best until now for me.

Mayuri Zarekar says:

thank you sooo much..it helped me a lot,my tutor had completely confused me.But your explanation seems so easy and simple.well done!

Yoann Eddy says:

wow these videos are just so great… all explained in details .. easy to understand… keep up the great job!! and Thx alot

Nazmus Salehin says:

It will be great if you publish a series only on different types of algorithm, implement them and show their application

Sagar Goswami says:

why are we not saving address of head node.?

nejm aloui says:

Thank you so much sir . this video really helped me to understand the linked list .

Hang Tung says:

you are a kind person

Linda Zhang says:

Sir, you explain things incredibly well,largely because your diagrams are so clear and colour-coded.Thank you!

J sh says:

i prefer using dot instead of -> it just looks stupid

IH JONY says:

thanks for this awesome tutorial series

PRADEEP YADAV says:

nice video

Siva K Pothuraju says:

Goodwork

pritam sarkar says:

please show me the whole code of the video, i am facing a big difficulty

Pooja Mahanand says:

Thankyou Sir:)

Tech-Support says:

Awesome man..I really very thankful to you for this bunch of tutorials. Thank’s man. 🙂

Darieee says:

Thanks man ! Would’ve preffered keyboard written code, but, I do like the human touch 😀 Keep up the good work !

sandu prasad says:

excellent

Abu Tahir says:

my code is given below
#include
#include
struct Node{
int data;
struct Node* next;
};
struct Node* head;
void insert(int x){
struct Node* temp3=(Node*) malloc(sizeof(Node));
(*temp3).data=x;
(*temp3).next=head;
head=temp3;
}
void print(){
struct Node* temp1;
temp1=head;
while(temp1!=NULL){
printf(” %d”,(*temp1).data);
temp1=(*temp1).next;
}
printf(“n”);
}

int main()
{
head=NULL;
insert(2);
insert(6);
insert(4);
insert(9);
print();
return 0;
}

but I am getting the following result while running the code

prog.c: In function ‘insert’:
prog.c:9:21: error: ‘Node’ undeclared (first use in this function)
struct Node* temp3=(Node*) malloc(sizeof(Node));
^
prog.c:9:21: note: each undeclared identifier is reported only once for each function it appears in
prog.c:9:26: error: expected expression before ‘)’ token
struct Node* temp3=(Node*) malloc(sizeof(Node));

sir please help me

Ahmad Belhaj says:

either use c or c++

Sonu Sonu says:

wow…great vdo sir ji…..thanks

Faneto T says:

Wish I paid you my college tuition in comparison to my professor.

20DoseOver says:

i will be graduated from youtube instutue of technology!

Sameer Khaan says:

y u use malloc?? i want to understand that with malloc

Raghu Raj Rai says:

This one was a bit unclear. You shifted to C++ in the middle. And also some explanation is needed regarding malloc and dereferencing for someone totally new to this program.

Aaron Supertramp says:

Thanks for explain the implementation in C/C++

Other videos just explain the idea but not explain how the implementation looks like in C/C++.

Thank you very much!

Harisankar L says:

xllent teaching

najeh mchirgui says:

Thanks you so much

ananthoju sriharsha says:

please remove subtitles because the text is not visible

Hassan Raza says:

I only have knowledge of C++. I don’t know what going on with C. Your tutorials are awesome but I can’t understand as I don’t know about C.

Knowledge adda says:

this video has many errors utter bullshit video

Arunava Nag says:

Could you please explain the significance of the last line after your while loop: temp1->link=temp;

Rudra Sai says:

very important and valuable information thankeww so much

Nazmus Saqib says:

Great work 🙂 Thanks a lot 🙂 you r just awesome man 🙂 u saved my 16500taka because I don’t need to retake this course 😀 😀

Ib Akshay says:

can anyone explain that traverse part alone . what does it mean by temp1 = temp1->link ? how temp1 = temp1->link will get to the next node ?

 Write a comment

*

Do you like our videos?
Do you want to see more like that?

Please click below to support us on Facebook!