Originally Posted by
Linux Trojan
I am not sure exactly what you are saying but my understanding is that everything in C is pretty much a function (I like to call them subroutines) and every function must return a value, even if its ZERO. Main is a function just like any other function. Thats my understanding, I am sure I will be corrected if I am wrong.
Wrong... not all functions have to return a value...
Code:
void add(int a, int b)
{ printf("%d", a + b); }
...No return value.
It does however turn out that main() has to return an int... as in int main (void) ... for a C program to work correctly.