I know that to get the number of bytes used by a variable type, you use sizeof(int) for instance. How do you get the value of the individual bytes used when you store a number with that variable type? (i.e. int x = 125.)
I know that to get the number of bytes used by a variable type,
Share
You can get the bytes by using some pointer arithmetic:
On my machine (Intel x86-64), the output is: