JOIN us on
WhatsApp Group Join Now
Telegram Join Join Now

हिंदी माध्यम नोट्स

Class 6

Hindi social science science maths English

Class 7

Hindi social science science maths English

Class 8

Hindi social science science maths English

Class 9

Hindi social science science Maths English

Class 10

Hindi Social science science Maths English

Class 11

Hindi sociology physics physical education maths english economics geography History

chemistry business studies biology accountancy political science

Class 12

Hindi physics physical education maths english economics

chemistry business studies biology accountancy Political science History sociology

Home science Geography

English medium Notes

Class 6

Hindi social science science maths English

Class 7

Hindi social science science maths English

Class 8

Hindi social science science maths English

Class 9

Hindi social science science Maths English

Class 10

Hindi Social science science Maths English

Class 11

Hindi physics physical education maths entrepreneurship english economics

chemistry business studies biology accountancy

Class 12

Hindi physics physical education maths entrepreneurship english economics

chemistry business studies biology accountancy

Categories: C Language in hindi

Linked Lists in hindi in c language , what is Linked Lists in c , c भाषा में लिंक्ड लिस्ट क्या है हिंदी में

c भाषा में लिंक्ड लिस्ट क्या है हिंदी में Linked Lists in hindi in c language , what is Linked Lists in c :-
हमने इससे पहले के article मे सभी data type को स्टूडे किया अब आने वाले article मे कुछ advanced data structure जैसे linked list,stack और queues को पढेगे |
जिसे की array भी एक लिस्ट है |array मे ,data को sequential collection है जिसमे data को index से accessing और manipulation का सकते है |लेकिन अर्रा में ,array की size को compile time पर declare करना होता है |जो की कई बार मुश्किल हो जाता है |इस प्रॉब्लम को solve करने के लिए एक नए data structure को introduce किया गया है |
Linked List
linked list एक एसी data structure है जिसमे data structure के item के अलावा lost मे आने वाले next item के address को contain किया जाता है |इस data structure को linked list इसलिए कहते है क्योकि इसमे list के सभी item आने वाले item से link होते है |
linked लिस्ट के प्रत्येक block को नोड कहते है |जिसके दो part होते है :-
1.पहले भाग linked लिस्ट के item को रखता है |
2.दुसरे भाग मे ,next item के address को रखता है |

इस data structure मे element , memory address से link नहीं होते है बल्कि किसी लॉजिकल लिंक से लिंक होते है जो की सभी नोड के दुसरे भाग मे store होता है |लिंक एक pointer variable होता है जिसका type दुसरे नोड के data type का होता है |linked लिस्ट को structure data type से define किया जाता है जिसका syntax है :-

struct node
{
int item;
struct node *next ;
};
इस syntax मे :-
1. item : item एक integer variable है जो की linked लिस्ट के element को रखता है |
2. next : next एक pointer variable है जो की linked लिस्ट के next element के address को contain करता है |इसका data type struct node होता है |
इस तरह की structure जो की members फ़ील्ड मे एसे member को रखते है जिसका data type ,खुद का data type होता है |ये structure self referential structure कहते है |
किसी नोड का syntax होता है :-
struct node
{
mem 1;
mem 2;
……….;
……….;
struct node *pointer_name ;
};
एक उदाहरन लेते है :-
struct node
{
int salary;
struct node *n;
};
ये एक linked list के node का declartion है |अब उसके बाद ,node1 और node2 दो नोड है जिसका data type struct node है |
इसे declare करेगे :-
struct node node1 ,node2 ;
इस statement से दो space create हो जायेगे जिसमे से एक space पहले node के item को और दुसरे node के address को contain करेगा |और दूसरा node ,दुसरे node का  item को तीरसे node के address को contain करता है |
अतः node1.n=&node2; अगला statement होगा जो की linked लिस्ट  की condition को follow करता है |
उसके बाद :
node1.salary=2000;
node2.salary=4500;
इन statement से , दो node के item वाले space मे 2000 और 4500 assign हो जायेगा |
अगर इस लिस्ट मे अगला node add होगा तब node2.n=&node3; statement से node3 का address node2 के pointer variable मे store हो जाता है |
अगर किसी लिस्ट का end हो जाता है  इस लिस्ट के last वाले element के pointer variable मे null pointer ‘0’ को store होता है | अतः node2.n=0;
किसी linked लिस्ट के element को access करने के लिए printf(“%d”,node1.n->salary); use कर सकते है |
Linked list : advantage और disadvantage :-
1.लिंक लिस्ट एक dynamic data type है इसे प्रोग्राम के run time के समय declare किया जा सकता है |मतलब इसके size को कम और ज्यादा run time के समय किया जा सकता है |
2.इस डट type से memory wastage नहीं होती है |ये memory को तभी use करता है जब इसे उसकी जरुरत होती है |अनावश्यक memory को होल्ड नहीं करता है |
3.सबसे महत्वपूर्ण advantage होता है की linked list की flexibility |इसका मतलब है की linked लिस्ट के किसी भी element को कभी भी rearrange कर सकते है |
Disadvantage
1,linked लिस्ट की सबसे पहले disadvantage है की item के random access complex और time consuming होता है |
2.अगर हम fixed length linked list को use करते है linked list सेअच्छा array होती है क्योकि linked लिस्ट से data को process करना मुश्किल होता है |
Sbistudy

Recent Posts

द्वितीय कोटि के अवकल समीकरण तथा विशिष्ट फलन क्या हैं differential equations of second order and special functions in hindi

अध्याय - द्वितीय कोटि के अवकल समीकरण तथा विशिष्ट फलन (Differential Equations of Second Order…

3 hours ago

four potential in hindi 4-potential electrodynamics चतुर्विम विभव किसे कहते हैं

चतुर्विम विभव (Four-Potential) हम जानते हैं कि एक निर्देश तंत्र में विद्युत क्षेत्र इसके सापेक्ष…

3 days ago

Relativistic Electrodynamics in hindi आपेक्षिकीय विद्युतगतिकी नोट्स क्या है परिभाषा

आपेक्षिकीय विद्युतगतिकी नोट्स क्या है परिभाषा Relativistic Electrodynamics in hindi ? अध्याय : आपेक्षिकीय विद्युतगतिकी…

5 days ago

pair production in hindi formula definition युग्म उत्पादन किसे कहते हैं परिभाषा सूत्र क्या है लिखिए

युग्म उत्पादन किसे कहते हैं परिभाषा सूत्र क्या है लिखिए pair production in hindi formula…

1 week ago

THRESHOLD REACTION ENERGY in hindi देहली अभिक्रिया ऊर्जा किसे कहते हैं सूत्र क्या है परिभाषा

देहली अभिक्रिया ऊर्जा किसे कहते हैं सूत्र क्या है परिभाषा THRESHOLD REACTION ENERGY in hindi…

1 week ago
All Rights ReservedView Non-AMP Version
X

Headline

You can control the ways in which we improve and personalize your experience. Please choose whether you wish to allow the following:

Privacy Settings
JOIN us on
WhatsApp Group Join Now
Telegram Join Join Now