I\'m pretty proficient in PHP, but I\'ve started dabbling with C. I\'ve seen the code
return 0;
at the end of functions that don\'t return
In C you don't have to return a value only if you declare a function with void at the start of it. First example:
#include
int main()
{
printf("Hello World!");
return 0; // you have to use return because main starting with int
}
Second Example:
#include
void main()
{
printf("Hello World!");
//in this case return is useless, main is a void function
}