Timeline for Is an Array Index content stored in one memory address?
Current License: CC BY-SA 4.0
15 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Oct 6, 2018 at 0:05 | review | First posts | |||
| Oct 6, 2018 at 0:35 | |||||
| Sep 6, 2018 at 12:26 | answer | added | Erik Eidt | timeline score: 1 | |
| Sep 6, 2018 at 6:17 | comment | added | Neil | Memory addresses are 32 bits on 32-bit systems and 64 bits on 64-bit systems, not 8. Addresses point to the first byte of potentially many. The compiler knows how long it is based on type hints you provided (aka int, long, char[], etc.). | |
| Sep 6, 2018 at 2:10 | answer | added | Jon Purdy | timeline score: 1 | |
| Sep 6, 2018 at 1:34 | comment | added | whatsisname | @Josepha: a 32 bit integer gets stored in 4 bytes in memory. The type system and compiler keep track of those sizes for you, much of the time. | |
| Sep 6, 2018 at 1:07 | answer | added | Karl Bielefeldt | timeline score: 5 | |
| Sep 6, 2018 at 1:02 | answer | added | jwdonahue | timeline score: 0 | |
| Sep 6, 2018 at 0:55 | review | Close votes | |||
| Sep 13, 2018 at 3:05 | |||||
| Sep 6, 2018 at 0:54 | comment | added | Joseph a | ok but isn't ONE memory address only one byte? how is a 32 bit integer stored in a one byte storage area? that what is confusing me. how is 2000 stored in one memory address if the bit count overflows the memory address capacity? or is it not stored in such way? | |
| Sep 6, 2018 at 0:50 | comment | added | πάντα ῥεῖ | An int probably covers a minimum memory space of 32 bits on most targets, There's only one memory address for each int in that array. I don't get what you mean or what confuses you. | |
| Sep 6, 2018 at 0:42 | comment | added | Joseph a | i might. but how is 2000 stored in memory? | 11111010 | 000 ? Assuming each| | is a memory address | |
| Sep 6, 2018 at 0:42 | comment | added | πάντα ῥεῖ | You seem to have some serious misconceptions about the memory layout of arrays. | |
| Sep 6, 2018 at 0:39 | comment | added | Joseph a | how is 2000 stored in memory? | |
| Sep 6, 2018 at 0:38 | comment | added | πάντα ῥεῖ | A decimal number of 2000 fit's just fine with an int, every value in that array may contain at least data of sizeof(int) bytes data. What are you asking about? | |
| Sep 6, 2018 at 0:33 | history | asked | Joseph a | CC BY-SA 4.0 |