Skip to content

What makes this number pop up out of nowhere? #21406

Answered by airtower-luna
Tunaik asked this question in General
Discussion options

You must be logged in to vote

That depends on your compiler and C library. “Undefined behavior” means they can do anything. Give some number, crash, draw a bunny on the screen… anything. In practice it’s most likely an artifact of how printf() is implemented. 😅

See also: Undefined behavior - Wikipedia

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants