JavaScript String Addition in C
We all dunk on "11" + 1 in JavaScript, but we forget it also works in C cat ~/foo.c #include <stdio.h> int main() { puts("11" + 1); } clang -Wno-all ~/foo.c ./a.out 1
A dark-mode tweet jokes that people mock JavaScript for treating "11" + 1 as string concatenation, while the C code shown also produces 1 because the string pointer is advanced by one character before printing. It is a programming-language reaction meme about hypocrisy and unexpected language behavior. EN: A dark-mode tweet jokes that people mock JavaScript for treating "11" + 1 as string concatenation, while the C code shown also produces 1 because the string pointer is advanced by one character before printing. It is a programming-language reaction meme about hypocrisy and unexpected language behavior.
- @ithueti / 4888 2021-10-10
- Type
- image
- Size
- 750×781 · 48.4 KiB
- Mood
- sarcastic, absurd
- Language
- en
- Added