What Is the Difference Between Stack and Heap?

Поделиться
HTML-код
  • Опубликовано: 1 окт 2024
  • Want some guidance to help you learn how to code?
    📘Download my FREE 30 day coding challenge here:
    henrikmdev.com...
    Need 1-on-1 coaching?
    💻Click below to learn more about my mentoring program:
    henrikmdev.com...
    When you've been coding for some time, you'll start to notice that people use these two terms called “stack” and “heap”. And you're confused thinking, “What is the difference between stack and heap?”
    When you see these words, start thinking “memory”. The stack and the heap are two different kinds of memory that your program uses while it's running. It's important to know the differences because it affects the way that you code your program.
    This is why I recommend that every programmer should learn C. It gives you a good foundation for understanding how the stack and the heap are used in your program. C is considered a low level language, but it's actually the highest level language that allows you to have manual control over the stack and the heap.
    Even if you're planning to only code in the higher level languages, it's still important to have a basic understanding and good intuition of the stack and the heap. It makes you a better developer and helps you write more efficient code. It also allows you to debug issues if you run into memory issues.
    So in this video, I'll be going over:
    ✅ The differences between the stack and the heap so that you're not confused anymore when you read about it online.
    ✅ One example in C showing you how you can manually manage your memory on the stack and the heap.
    ✅ A second example in Python which shows how understanding the stack and the heap really helps you write more efficient code.
    =================================================
    📚 Stay Tuned for More:
    If you found this video helpful, make sure to like and subscribe to our channel for more programming tutorials and tips. We have a lot more exciting content in store for you, so stay tuned!
    / @henrikmdev
    👨‍💻 Have Questions?
    If you have any questions or want to suggest topics for future videos, please leave a comment below. We love hearing from our viewers and are here to help!
    🔔 Turn on Notifications:
    Don't forget to ring the notification bell so you never miss an update from us. Stay ahead in your programming journey!
    =================================================
    💡 Coding Tutorials:
    • Coding tutorials
    💡 Git Tutorials:
    • Git tutorials
    💡 Dev Tool Tutorials:
    • Dev tools
    📁 Sample Code:
    Find the sample code used in our tutorials on our GitHub page:
    github.com/hen...
    =================================================
    📚 Books
    C Programming Language: amzn.to/3uwHmI6
    Learning the bash Shell: amzn.to/3Ghr9t2
    ⚙️ Gear
    Webcam - Logitec Brio: amzn.to/47KUtUk
    Lighting - Ring Light Clip: amzn.to/49PtgBL
    Microphone - AKG Pro Audio P220: amzn.to/47P6Tus
    Audio Interface - Focusrite Scarlett 2i2: amzn.to/3QThFZM
    Thank you for watching, and happy coding! 💻🧡
    -Henrik
    Disclaimer: Some of these links are referral links. I may earn a commission if you use them, at no extra cost to you. You're not obligated to use these links, but it would be appreciated. Thanks!
    #Programming #Coding #StackVsHeap #LearnC #PythonCoding #MemoryManagement #EfficientCoding #Debugging #LowLevelProgramming #HighLevelProgramming

Комментарии • 1

  • @henrikmdev
    @henrikmdev  3 месяца назад +1

    Want some guidance to help you learn how to code?
    📘Download my FREE 30 day coding challenge here:
    henrikmdev.com/challenge