Programmer --- C language details 8

Source: Internet
Author: User

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:


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.