Programmer --- C language details 8
Main Content: function parameter transfer, declaration, and other details
# Include
Int ff (); // 1. When the char, short, and float types are not in the function parameter list (int and double types can be omitted ), the parameter type description can be omitted in the function declaration, // but the parameter type cannot be omitted in the definition. // 2. The parameter name can be omitted during Declaration, for example, int ff (int ); only int main (int argc, char ** argv) {ff (333); // ff has three parameters and only one parameter is passed without error, unknown other variable values int I = f ('A'); printf ("I = % d \ n", I); return 0 ;}int ff (double, int c, int t) // It cannot be of the char, short, or float type {printf ("a = % d \ n", ); printf ("c = % d \ n", c); printf ("t = % d \ n", t); return 0;} int f (c) char c; // This can be defined before the ansi c standard, and {return c;} can be used for testing now ;}
Output: