Code to create a Linked List in C Programming Data Strucutres

preview_player
Показать описание
Code to create a Linked List in C Programming Data Strucutres.
Рекомендации по теме
Комментарии
Автор

Sir, I just would like to say THANKS! Your videos have help my friends and me to pass the class and finally graduate. Some professors are always confusing students, but you make EVERYTHING easier. Please, keep up the good work and God bless you!

megamanx
Автор

"Hello, friends!" Thank you for making this video. It was immensely helpful.

gyogamble
Автор

bhai I was wandering on youtube for last 5 days to clearify my concepts.Atlast I found you here I just wanna say you safe myself from quiting the linked list.

fahadhassan
Автор

After referring to countless of resources, your videos made the most sense. You are a genius!!

geekyprogrammer
Автор

I swore this is the best lecture i have ever seen.

priyangam
Автор

Heres the above code implemented with a prit function I made to show you the output
#include <stdio.h>
#include <stdlib.h>


typedef struct node node_t;


//Defining a Node
struct node {
int data; //each NODE has a data entry
node_t *next; // and a pointer to the next Node
};


node_t *head;


void
print() {


node_t *temp =
temp = head;
printf("The list contains: \n");
while (temp != NULL) {
printf("%d\n", temp->data);
temp = temp->next;
}
}






int main(void) {


int n;
printf("Enter total number nodes: ");
scanf("%d", &n);




node_t *temp, *p;


//for the first node, we must take it separately and shouldnt be included in the for loop
int i = 1, element;
printf("Enter node number %d: ", i);
scanf("%d", &element);


temp =
temp->data = element;
temp->next = NULL;
p = temp;
head = temp;




for (i = 2; i <= n; i++) {
printf("Enter node Number %d: ", i);
scanf("%d", &element);
temp =
temp->data = element;
temp->next = NULL;
p->next = temp;
p = p->next;
}
print();


}

YohanMidha
Автор

That's the best video I have ever seen for the Linked List
Simple and Clear
Keep it up Sir

snehalmishra
Автор

Sir ultimate video keep inspiring us by making new videos lecture
🌟

tanmaykapil
Автор

You are a magician! Great explanation! AMAZING! You don't skip anything, great job!

asdgqgqwe
Автор

sir your explanation is the best because you explains from basic that can be understand by every type of student...Thank you sir

wonderfulmusiclofi
Автор

Starting to understand linked lists thanks to you. You’re amazing!!

bestredditstories
Автор

A perfect teacher for Data Structure, , ,

hafizbilalahmed
Автор

Thank you sir, you make it understandable..

rutujamurge
Автор

Thank you for making this video, I finally understand linked list

harshwalia
Автор

Finally Understood Thanks for this explanation

gourangpathak
Автор

sir u r teaching is easy to understood,

Pritamdas-bgfp
Автор

thank you continuous the other programs including all programs

gemedabekanaofficial
Автор

after watching your video i understood linkedlist concept
thank you very very very much sir

sushannthreddy
Автор

Hello mr Vivekanand Khyade I am Alaa from Syria, thank you very much this vedio helps me

lab_er
Автор

You are the best. I would like videos on EULER, AND HAMILTON theory!!!!

firibuanyass