A student of one of my courses asked me why addresses are sometimes shown as negative values when they are displayed as decimal integers in C. The answer is not obvious. It turns out that this is a side-effect of assigning very large numbers and it can cause unexpected results in all kinds of odd places that have nothing at all to do with addresses. And it doesn’t only affect C programs either.
In this video, I go riding the ranges to track down the mystery of unexpected negative numbers.
PROGRAMMING BOOKS
====================
If you want to learn programming in more depth (and also support this channel!) you might think of buying one of my books. I have written books on C programming, Using Pointers in C, Recursion and other programming topics. You can buy my books (paperback or Kindle) on Amazon.
“CODE WITH HUW” ON TWITTER:
=================================
/ codewithhuw
“CODE WITH HUW” ON FACEBOOK:
=================================
/ codewithhuw
Good luck! And good programming!