►C Programming playlist: https://www.youtube.com/playlist?list=PLvv0ScY6vfd8M-Mi_Vyrg7KgISTW3Sklt
►Find full courses on: https://courses.mshah.io/
►Join as member to get perks: https://www.youtube.com/channel/UCA64pZbN5Mz5NxC3SO4qpDg/join
►Lesson Description: In this lesson I show you how to use pointer arithmetic in the C language. In fact, we have already been using it quite a bit when accessing information in arrays. I'll show you that when we use arithmetic, we are actually offsetting the number of bytes of the underlying type. In addition, I'll show you subtraction (hah!), and something to be a little careful of as well with the memory allocator.
00:00 introduction
00:36 Setup and explanation of array memory layout
2:22 Brackets dereference, and the offset is the pointer arithmetic.
5:35 Using sizeof to find our types size
7:00 Experimenting with sizeof -- just size of stack variable!
11:06 Pointer subtraction to show you allocation boundary
16:20 Conclusion
►Please like and subscribe to help the channel!
►YouTube Channel: https://www.youtube.com/c/MikeShah
►Join our free community: https://courses.mshah.io/communities/Q29tbXVuaXR5LTI3MzAz