feauters are just the additions for easiness and flexibility, that sucks your efforts. the language is what,when that come to exists, not after 100 yrs..
(remember when they add the file related stuffs to the C language.. The time of creation at BELL lab ?? )
[ It is possible to represent everything in this universe by using 0 and 1 ]
A function return type defaults to int , unless explicitly specified otherwise. So, you could have a prototype that looked like
and have a
at the end of foo() . Or any other integer, anywhere in foo() , if you're pedantic like me.
I read that the C++ standardization committee was debating as to that default should be removed, i.e., whether you had to declare it as
int foo (int,char *);
but I'm not sure what happened. I always explicitly give the return type in the prototype.
----------------------------- My site due for a massive update
Radioactive cats have 18 half-lives.
"Do not give redundant error messages again and again." - A classmate of mine, while giving a class talk on error detection in compiler design.
in fact, that's not the smallest program in C (i mean, standard C, the one which is "compilable" by everyone!). if you do not specify a return type to your function, the compiler will consider it is an integer (so you have to type a return line). otherwise, you should type void before main...
anyway, what is the utility of such programs ??? ;P