logoalt Hacker News

andrewmcwatters04/23/20251 replyview on HN

Uninitialized variables are a really common case.


Replies

gmueckl04/23/2025

The pointer to the uninitialized variable is passed to scanf, which writes a value there unless it encounters an error. The compiler cannot understand this contract from the scanf declaration alone.