Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

1 Answer
Samual Sam

If some function has no return type, then the return type will be int implicitly. If return type is not present, then it will not generate any error. However, C99 version does not allow return type to be omitted even if it is int.

Example

#include<stdio.h>
my_function(int x) {
   return x * 2;
}
main(void) {
   printf("Value is: %d", my_function(10));
}

Output

Value is: 20

Advertisements

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.