The binary you ran was not built from the source you edited, so the question is where the pipeline broke, not what the logic does. The blunt case is forgetting to recompile: the executable is a frozen snapshot of the last build, and editing the .c file does nothing to it. Past that, the failures get more interesting. You may have run a different binary, an older copy earlier on $PATH, which is why ./hello beats hello. Your build may have failed while an old, working executable stayed on disk, so always check whether the build actually succeeded rather than assuming. With make, a stale object file can survive if timestamps look up to date, especially when you edited a header: without generated dependency files, make doesn't know the .c depends on it and happily relinks the old object, so make clean resolves what looks like impossible behavior. On embedded there's one more link in the chain and it catches people constantly: you compiled and linked successfully, but never flashed the new image, so the chip is still executing the previous firmware. The general habit is to make the change visible, print something unmistakable or deliberately break the build, and confirm you can observe it. If you can't, you've proven the binary isn't yours before losing an hour to debugging.
Programming Fundamentals · Interview question
You changed your source file but the program behaves the same way. What's wrong?
A strong answer
What a weak answer sounds like
You know the answer. Do you know what gets you dinged?
Pro breaks down the answer most candidates actually give to this question — and the specific reason an interviewer marks it down. It’s the difference between sounding correct and sounding senior, on all 472 questions.
From the lesson
What Is a Program?
A program is text on disk until you compile it. Walk through the source → compile → run loop you'll repeat thousands of times.