C Language JavaScript Arithmetic
a lot of people don't know this - C actually lets you do arithmetic with mixed types, much like JavaScript: 🟢 luna@sappho:~$ bat -p c-js.c #include <stdio.h> int main() { puts("0.5" + 1); } 🟢 luna@sappho:~$ gcc c-js.c && ./a.out 0.5 🟢 luna@sappho:~$ This also works for exponents: 🟢 luna@sappho:~$ bat -p c-js.c #include <stdio.h> int main() { printf("%d\n", 50 ** "2"); } 🟢 luna@sappho:~$ gcc c-js.c && ./a.out 2500 🟢 luna@sappho:~$
A screenshot of two humorous programming posts showing fake C code that appears to support JavaScript-style mixed-type arithmetic and exponentiation. The punchline is that the displayed commands and outputs are impossible or misleading in real C, parodying confusion between C and JavaScript syntax. It is sent as a reaction to absurd programming claims, language misinformation, or intentionally cursed code.
social media post / пост в соцсетиprogramming code / программный кодterminal window / окно терминалаcomputer cursor / курсор компьютераsource code file / файл исходного кодаC language / язык CJavaScript reference / отсылка к JavaScriptcompiler command / команда компилятораtext editor output / вывод текстового редактораblack interface / чёрный интерфейс
- @ithueti / 5863 2022-03-19
- @right_wing_dev_squads / 11521 2025-02-15
- Template
- Twitter screenshot
- Type
- image
- Size
- 449×800 · 54.9 KiB
- Mood
- absurd sarcastic
- Language
- en
- Added