Home > Article > Backend Development > In C language, the implicit return type is int
If a function has no return type, the return type will default to int. If no return type is specified, no error is generated. However, even if the return type is int, the C99 version does not allow the return type to be omitted.
#include<stdio.h> my_function(int x) { return x * 2; } main(void) { printf("Value is: %d", my_function(10)); }
Value is: 20
The above is the detailed content of In C language, the implicit return type is int. For more information, please follow other related articles on the PHP Chinese website!