No defined type of a function parameter defaults to int? Am I insane?
问题 For some odd reason I was copying an example in another language of which does not use types, and forgot to add one in to a function definition parameter, and it worked. #include <stdio.h> char toChar(n) { //sizeof n is 4 on my 32 bit system const char *alpha = \"0123456789ABCDEF\"; return alpha[n]; } int main() { putchar(toChar(15)); //i.e. return 0; } I am sure that main defaults to int by most compilers of some standard (but only return), is this also a behaviour true for other functions