memesearch
Smallest Undefined C Program

Smallest Undefined C Program

Download Find similar pictures
Text on the meme
int main() { int x = 0; return ( x = 1) + (x = 2); }
What it means

A short C program initializes x to 0 and then returns the sum of two assignments to x in one expression. The joke is that the order of evaluation is undefined in C, so different compilers produce different results. It is shared as a programming reaction to compiler quirks, language-lawyer puzzles, and undefined behavior. EN: A short C program initializes x to 0 and then returns the sum of two assignments to x in one expression. The joke is that the order of evaluation is undefined in C, so different compilers produce different results. It is shared as a programming reaction to compiler quirks, language-lawyer puzzles, and undefined behavior.

Objects
Tags
Source
Type
image
Size
319×132 · 6.3 KiB
Mood
absurd, technical
Language
en
Added