Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

C assumes some sort of object space addressable to the byte (each object is composed of one or more bytes -- no such a thing as a 0 bytes object in C). It's the memory pretty much. Afaik, what is an address is not defined as part of the language. I guess people should use the knowledge they got from their "how computers work" classes =D. A pointer holds an address. I think that's as deep as you can get with this as clarifying goes.

You can though, say, to help learners that the address of an object is a value which can be used to indirectly access the object. You could say that it's a value that you can keep with you, to access the object later, indirectly.

And, as any language that I am aware of. Things are usually defined abstractly (in terms of what you want to be true about them). C is not different. You won't find concrete definitions (things may look concretely defined, but they're not). As far as we're concerned, addresses are these things that

- the address-of operator returns

- is help by pointers

- can be indirected

- ...

It could be represented as a character string for all we know.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: