# C main Return Values in C89 and C99

DevFeed: [C main Return Values in C89 and C99](<https://devfeed.tech/articles/there-is-no-printf-30249.md>)

Original publisher: [Read original article](<https://www.netmeister.org/blog/return-printf.html>)

Published: 2021-10-13T15:23:21Z

Content type: article

Language: en

Sources: [Signs of Triviality](<https://devfeed.tech/sources/signs-of-triviality.md>)

Topics: [C](<https://devfeed.tech/topics/c.md>)

Tags: [behavior](<https://devfeed.tech/tags/behavior.md>), [c](<https://devfeed.tech/tags/c.md>), [return](<https://devfeed.tech/tags/return.md>)

## AI overview

The article discusses what happens when a C program's main function does not explicitly return a value. It states that C99 provides a return value of 0, while the behavior in C89 is undefined.

## Source excerpt

In C, 'main' returns an int. What happens when you don't explicitly return a value, though? C99 provides a return value of 0, but C89... well, that's undefined, my favorite kind of behavior.