The default return type of a function in C is not void, but int. The return type of main is int for both languages. Function declarations (or definitions prior to use) are mandatory in C++, which is a more strongly typed language.