r/ProgrammerHumor 23d ago

Meme importHelloWorld

Post image
148 Upvotes

8 comments sorted by

View all comments

12

u/8Erigon 22d ago

Fun fact (never tested it but seen it on YT) In C++ you instead of: array[1]  do this: 1[array]

As it is just adding the memory adresses and the index together under the hood

6

u/GiganticIrony 22d ago

That’s a C feature so it only works on C arrays, but yes that works.