हिंदी माध्यम नोट्स
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
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
Stack : Implementation Using Linked List in c language in hindi , स्टैक को लिंक लिस्ट का उपयोग करने इम्प्लीमेंट करना
स्टैक को लिंक लिस्ट का उपयोग करने इम्प्लीमेंट करना , Stack : Implementation Using Linked List in c language in hindi :-
Stack को दो प्रकार से Implementation कर सकते है (i) using array (ii) using linked list |linked लिस्ट की तुलना मे array मे push (insertion ) और pop (delete) operation को करना easy होता है |लेकिन array के साथ dynamic memory एलोकेशन possible नहीं है | इस कमी को दूर करने के लिए stack को linked लिस्ट से
Implementation किया जाता है | linked लिस्ट run time पर memory allocate करती है |इसलिए stack Implementation using linked list ही सबसे ज्यादा अपनाया जाता है |
push operation की algorithm है :-1. सबसे पहले एक नये node new 1 को बनाया जाता है जिसमे data value को assign होती है |
pop operation की algorithm है :-
1.सबसे पहले stack की emptyness को check किया जाता है |अगर stack empty है तब empty stack का message आ जायेगा |
इस प्रोग्राम मे , char function है :
1.main() : इस function मे , प्रोग्राम की main body होती है |जिसमे सभी function push() ,pop() और display_stack () को call किया जाता है |
2.push() : इस function का use ,stack array मे element को add करने के लिए किया जाता है |
3.pop() : इस function का use , stack element मे element को डिलीट करने के लिए किया जाता है |
4.display_stack() : इस function का use ,stack के सभी element को display करने के लिए किया जाता है |
सबसे पहले ,header portion मे एक structure को declare किया गया है | जो की linked लिस्ट एक node को define करता है | इसका एक variable है जिसका नाम head है |
main() मे ,
इस function मे ,
1.सबसे पहले दो variable ch , और new को declare किया गया है | (i) ch मे , यूजर द्वारा दिए गये choice को assign किया जाता है |और (ii) new मे , यूजर द्वारा दिए गये नए data को assign किया जाता है |
‘2’ से pop operation होगा |
‘3’ से display operation होगा |
‘4’ से exit operation होगा |
यूजर द्वारा दिए गये input के आधार पर हो function को call किया जाता है |
push operation :
1.सबसे पहले एक variable newdata को declare किया जाता है जिसका data type struture employee है|
4.ii-temp को temp के address field मे store address से increment कर देगे |
Recent Posts
four potential in hindi 4-potential electrodynamics चतुर्विम विभव किसे कहते हैं
चतुर्विम विभव (Four-Potential) हम जानते हैं कि एक निर्देश तंत्र में विद्युत क्षेत्र इसके सापेक्ष…
Relativistic Electrodynamics in hindi आपेक्षिकीय विद्युतगतिकी नोट्स क्या है परिभाषा
आपेक्षिकीय विद्युतगतिकी नोट्स क्या है परिभाषा Relativistic Electrodynamics in hindi ? अध्याय : आपेक्षिकीय विद्युतगतिकी…
pair production in hindi formula definition युग्म उत्पादन किसे कहते हैं परिभाषा सूत्र क्या है लिखिए
युग्म उत्पादन किसे कहते हैं परिभाषा सूत्र क्या है लिखिए pair production in hindi formula…
THRESHOLD REACTION ENERGY in hindi देहली अभिक्रिया ऊर्जा किसे कहते हैं सूत्र क्या है परिभाषा
देहली अभिक्रिया ऊर्जा किसे कहते हैं सूत्र क्या है परिभाषा THRESHOLD REACTION ENERGY in hindi…
elastic collision of two particles in hindi definition formula दो कणों की अप्रत्यास्थ टक्कर क्या है
दो कणों की अप्रत्यास्थ टक्कर क्या है elastic collision of two particles in hindi definition…
FOURIER SERIES OF SAWTOOTH WAVE in hindi आरादंती तरंग की फूरिये श्रेणी क्या है चित्र सहित
आरादंती तरंग की फूरिये श्रेणी क्या है चित्र सहित FOURIER SERIES OF SAWTOOTH WAVE in…