you will never ask about pointers again after watching this video

1,967,776
1,138
Published 2022-06-19
One of the hardest things for new programmers to learn is pointers. Whether its single use pointers, pointers to other pointers, pointers to structures, something about the concept drives new programmers crazy. The C programming languages is recognized as one of the most difficult programming languages to learn. The reason for this is the limitless power you have over memory management, which comes from pointers.

In this video, I show you what a pointer is, as it applies to low level memory access. Also, we talk about pointer syntax in C and how you can better understand the pointer syntax by converting it to English. And we wrap the video up by asking "why do we care?".

đŸ« COURSES đŸ« Learn to code in C at lowlevel.academy/
📰 NEWSLETTER 📰 Sign up for our newsletter at mailchi.mp/lowlevel/the-low-down

🙌 SUPPORT THE CHANNEL 🙌 Become a Low Level Associate and support the channel at youtube.com/c/LowLevelLearning/join

Why Are Switch Statements so HECKIN fast?    ‱ why are switch statements so HECKIN f...  
Why Do Header Files Exist?    ‱ why do header files even exist?  
How Does Return Work?    ‱ do you know how "return" works under ...  

🛒 GREAT BOOKS FOR THE LOWEST LEVEL🛒
C Programming Language, 2nd Edition: amzn.to/3OKh3q2
Computer Systems: A Programmer's Perspective: amzn.to/3N3PqHe
Blue Fox: Arm Assembly Internals and Reverse Engineering: amzn.to/4394t87
Practical Reverse Engineering: x86, x64, ARM, Windows Kernel, Reversing Tools, and Obfuscation : amzn.to/3C1z4sk
Practical Malware Analysis: The Hands-On Guide to Dissecting Malicious Software : amzn.to/3C1daFy
The Ghidra Book: The Definitive Guide: amzn.to/3WC2Vkg

đŸ”„đŸ”„đŸ”„ SOCIALS đŸ”„đŸ”„đŸ”„
Low Level Merch!: www.linktr.ee/lowlevellearning
Follow me on Twitter: twitter.com/lowlevellearni1
Follow me on Twitch: twitch.tv/lowlevellearning
Join me on Discord!: discord.gg/gZhRXDdBYY

All Comments (21)
  • Working with pointers is easy af... Just try different permutation and combinations of & and * until code works like u wanted it to work... Don't complicate easy things.. xD 😁😁
  • C++ was the first language I learned.. and I only spent a short time with it. But one thing that made all the difference was having a mental model of computer's memory with addresses and values. Before I knew to do that, C++ was incredibly frustrating. This video is smart to lead with that lesson.
  • @fang8244
    One important clarification. The asterisk(*) is an attribute of the variable not the type which your explanation seems to suggest. This distinction is important because if you consider the following line: int* x, y; x is a pointer to an int while y is just an int. If you wanted both to be pointers you would need to write something like: int *x, *y;
  • I'm a senior majoring in Computer Science at college. If you're a young person whose looking to learn about programming and computers, keep watching this guy's stuff! All complex systems can be broken down to simpler parts. That's what this channel does very well when explaining complex concepts like pointers. This is the first video I've seen but I'm definitely subbing cuz this guy not only knows his stuff but more than I do! My college experience was incredibly lacking in low level courses, which I imagine will be the case at many other universities in the coming future. High-level problem solving has it's place, but low-level is important because a house won't last without a proper foundation. The foundations of computer science are the most important area to master, arguably more important than programming itself. Don't be a cog; be the future.
  • @Ogrodnik95
    Understanding references, pointers, smart pointers and memory is gamechanger and is crucial thing to know. Dont give up trying to understand, it is well worth it and with bit of practice becomes normal to read and understand. I regret giving up programming because of this at school, it would have boosted my career as software engineer forward by years had i put more time into it.
  • Video idea: How malloc() works and how does it know what memory is considered "free to use". I started programming on retro game consoles where you know ahead of time exactly how much RAM you have at your disposal, so allocation functions in general are very "alien" to me.
  • Understanding isnt hard, applying it cleanly is. Working by bypassing scope might be faster but the need of keeping track of it is hard lest one gets memory leak. Not to mention in bigger teams having to rely on coworkers to apply it cleanly. It becomes a cascading problem with less avenues to debug such bugs. edit: 1yr on seems my post got some traction, I want to add something. One of many uses and evolution of a Computer is to be a better Calculator. To that end, computers must be able to provide to a user mildly complex logical constructs/objects on which mathematics can be applied and work on them e.g. plus symbol signifying Concatenation of String objects. One should be able to develop some function without having to think of this and that memory allocation. Usage of pointers should only be approached by the top 1 percentile of experienced devs who is probably designing a solution for other devs; or embedded devs having to work with low level resources but won't have a cascading problem.
  • @ghost_cipher
    I don’t fully understand everything, but you make me feel like I will one day
and that’s the most important thing I enjoy the most! It’s all about the journey of learning and not always to the final destination! Thank you for this content!
  • @cindrmon
    i actually appreciated pointers more when i started to learn golang! it really helps especially when you don't always want to expect a return type when making a function and just modify a value that you pass into
  • The best tutorial so far. This is what high lever languages do all the time with "references" which is just a pointer bound to a value but you cant play with the pointer directly only the value he is pointing too.
  • @TDG361
    I struggled quit a bit with pointers and references back when I was learning C (my first programming language,) but I did not gave up and eventually managed to understand them. They're so simple, yet so powerful, and open up an almost infinite number of possibilities. Sometimes, I managed to break programs when using pointers, but in general I have no problem using them 😄
  • @t0k4m4k7
    Great explanation, i think the reason why pointers are so widely misunderstood or hardly understood is the lack of explanation regarding memory layout (which you explained really well) and the not so intuitive syntax
  • @Bchicken2
    Great video, but I think it required more examples of the applications of pointers. Beginners tend to have a small scope of the concept of pointers with a simple explanation. But honestly to me, pointers can never be explained. Its concept and applications can only be truly understood once we've experimented with it hahaha.
  • @nati7728
    I’ve been programming for years and I still feel like this video flipped a switch in my brain. Excellent, I’m going to bookmark this
  • @BogdanSerban
    I really understood pointers when I got into embedded programming, where you have to access builtin memory address (registers), read their state or write to them. But wait until you get into typecasting pointers, that gets really fun.
  • I’ve never really used C so i’m more familiar with the newer languages masking this functionality. Listening to this video is really easy to absorb. Honestly if you can show more examples of pointers in a part 2 i think someone could really solidify the knowledge quickly!
  • About to finish my computer science degree, and I never really understood pointers because most modern languages abstract this. It's nice to make a full circle though. Thanks!
  • @Nasengold
    3 min in and I straight up subscribed. The code translation into english is exactly what makes this so easy to learn. Thanks a lot.
  • @Trenchv1
    Before the video even starts. These 3 questions are literally what I've been thinking about for the past few days.