This is a C language pointers tutorial. It's purpose is to show how primitive types like 'int', 'char' and pointers are laid out in computer memory.
It supports a subset of the C language and in some cases deviates from the language. Your program is limited to declarations only. No real code allowed. Arithmetic operations are not suppored. Type checks are very limited - in many cases you can assign pointers of different types without type coercion.
In the "Source" window you can enter your C language program. It will be compiled into memory layout which is displayed above in the "Real thing" stripe.
The "Real thing" is a simulation of a computer with 256 bytes of memory, 4 byte-wide integer type, 1 byte char type and 2 byte poitner type. All the bytes are displayed in the "Real thing" stripe above. You can scroll it by dragging left and right with a mouse.
Memory is shown as a stripe of memory cells. Under each cell there is the cell address in hexadecimal. Inside of each cell it's contents is shown.
Unallocated memory cells are shown in GRAY.
Allocated but uninitialized memory cells are shown in RED.
Allocated and uninitialized memory cells are shown in GREEN.
Whatever you entered into "Source" block is compiled and displayed in the "Real thing" block.
As you edit your source code the memory stripe is updated automatically.
Any errors in your programs are shown in red in the ERROR area.
Pointers are shown as blue arrows from pointer to the pointee.
Here you can see a pointer variable "name" pointing to unnamed block of memory which contains characters "Tanya", and a char pointer which points to name itself (here we differ from the real C language - it will be double pointer in the language).
Ever wondered what is the difference between char [] and char *?More features are shown here. Feel free to explore on your own.
1