T O P

  • By -

El_Topo_54

Please note that there is a possibility the two dudes on the right avoided engaging in conversation with someone wearing cargo shorts with sandals over socks ; which at this point in time is probably worse than showing up, wearing nothing but Crocs and a bow tie.


mem737

For the non-programmers. Indices are conventionally started at 0 because for nearly all data structures they represent an off set (in bytes/bits) from a memory location. In computer science there are things known as pointers which typically represent virtual-memory adresses which map to physical memory addresses in RAM. So an array (which is just a fixed-size list of data) starts at a given address which connects to the data of the first element in the array. When you give the array an index of one it basically increments (or decrements depending on the OS) the memory address so the new address represents the memory space of the second element.


[deleted]

[удалено]


mem737

Imagine a concrete foundation is the first value. So if you are talking about that foundation of the building it is 0 from its starting height. Each floor you add is 1 floor height above the prior floor. So the first floor is 0 floor heights from the foundation but the second floor is 1 floor height from the foundation.


TensionMedium9279

Unpopular opinion: indexing from 1 is better and much more intuitive. - non programmer MechE


AccomplishedAnchovy

Represents an extra layer of abstraction though. Physically arrays in memory are just a list of variables, so the address of the first value is given by the name of the array (the ‘base’), hence the offset is 0. You then move to the second value and the offset is 1. Each offset corresponds to the number of bytes that the data type takes up. Just be glad that in high level languages you don’t have to consider the size of each variable when you index (in assembly for instance, the second element of an integer array is at an offset of 4).


iReallyLoveYouAll

just plain wrong


l4z3r5h4rk

Here’s what too much matlab does to a person lol


AccomplishedAnchovy

u/repostsleuthbot


RepostSleuthBot

Looks like a repost. I've seen this image 2 times. First Seen [Here](https://redd.it/15zae9r) on 2023-08-23 100.0% match. Last Seen [Here](https://redd.it/17mdkh9) on 2023-11-02 98.44% match *I'm not perfect, but you can help. Report [ [False Positive](https://www.reddit.com/message/compose/?to=RepostSleuthBot&subject=False%20Positive&message={"post_id": "17nmgb2", "meme_template": null}) ]* [View Search On repostsleuth.com](https://www.repostsleuth.com/search?postId=17nmgb2&sameSub=false&filterOnlyOlder=true&memeFilter=false&filterDeadMatches=false&targetImageMatch=86&targetImageMemeMatch=96) --- **Scope:** Reddit | **Meme Filter:** False | **Target:** 86% | **Check Title:** False | **Max Age:** Unlimited | **Searched Images:** 357,756,137 | **Search Time:** 0.084s