Hofmaimaier ( NichEherVielleicht@feddit.org ) to Programmer Humor@programming.dev · 8 months agoultra casualfeddit.orgimagemessage-square29linkfedilinkarrow-up1263
arrow-up1263imageultra casualfeddit.orgHofmaimaier ( NichEherVielleicht@feddit.org ) to Programmer Humor@programming.dev · 8 months agomessage-square29linkfedilink
minus-squareChaoticNeutralCzech ( ChaoticNeutralCzech@feddit.org ) linkfedilinkEnglisharrow-up4·8 months agoYou are correct, that is simplified. The whole line is int personality = sizeof(goals) / sizeof(goals[0]); To get the length of an array in C, it’s necessary to divide its memory footprint by the size of a single element! BTW you can see what appears to be ASCII in the background of that image. You can decode it if you’re bored.
You are correct, that is simplified. The whole line is
int personality = sizeof(goals) / sizeof(goals[0]);To get the length of an array in C, it’s necessary to divide its memory footprint by the size of a single element!
BTW you can see what appears to be ASCII in the background of that image. You can decode it if you’re bored.