Function without return type specified in C

If you do not specify a return type or parameter type, C will implicitly declare it as int.

This is a “feature” from the earlier versions of C (C89 and C90), but is generally considered bad practice nowadays. Since the C99 standard (1999) does no longer allow this, a compiler targeting C99 or later will likely give you a warning similar to the following:

program.c: At top level:
program.c:8:1: warning: return type defaults to ‘int’
 workover(i)
 ^

Leave a Comment