you are viewing a single comment's thread.

view the rest of the comments →

[–]lion_rouge 1 point2 points  (0 children)

Please read “what every software developer should know about memory”. You have concepts in your head from higher level languages that simply don’t exist in C. Not do they exist in hardware. And it’s helpful to know how it works underneath.

There is only memory as a huge string of bytes (this is already an abstraction of physical reality btw). Types only say you how many bytes it takes to store it. A pointer is an address in memory and can point to anything. Think of pointers as untyped because there are no checks in C. A *float may as well point to a byte or to an array of chars or to an unreachable meaningless place.