If you don't mind helping me a little, I have a few questions for you:
1) Why is it possible different data types(which should be different sizes) be the same size in memory?
Take the sizeOf() function. I read where it's possible that you can pass it a long and print out the result, pass it a integer and print out the result, and you can come up with the same results. Like an int might be 4 bytes(which it should on a 32bit proc.), and a long might also show up as 4 bytes...But why? Why can this happen, and why is it allowed?
2) This question is concerning memory pointers. Is it really necessary to create a variable to hold a memory address? Take this code for example:
unsigned short shortVar = 6;
unsigned short * memAdd = shortVar;
Is it really important to create a "special" variable to hold the memory address?
Why not this to get the address:
int x = &shortVar;
and if you want to get the value at that address you already have the value stored in it's own variable. I'm jut a bit confused with this "design". Is the memory pointer "function" there just more bells and whistles, or is it actually very useful?
I hope all that make sense, because I just confused the crap out of myself. Sorry if it don't.