Open main menu

CDOT Wiki β

Changes

Week 3

598 bytes added, 11:06, 26 May 2010
Created page with 'What is a platform? - a combination of a CPU, OS and compiler. What is an address? An unsigned integer (no negative numbers) Why have pointers and not just unsigned ints? Becau…'
What is a platform? - a combination of a CPU, OS and compiler.

What is an address? An unsigned integer (no negative numbers)

Why have pointers and not just unsigned ints? Because pointers do not show us what type of variable we are working with. For example, when working with this: unsigned int b = &a; we have no idea what type of variable the address of a is holding.

What is the real difference?

The real difference is that when you add one to a pointer, it doesn't just add one, it adds 4 bytes (it wants to go to the next integer in memory - or 8 bytes for double, etc). Pointer rithmetic
1
edit