Declaration of C-language functions

Source: Internet
Author: User

#include <stdio.h>//function Declaration//declaring method One//int sum (int v1, int v2);//function declarations can be defined repeatedly//only the function declaration, no implementation of the function at compile time is no problem//The compiler will only check for syntax errors, and the link will see if the function is actually implemented.//declaring method twointSumint,int);intSumint,int);intSumint,int);intSumint,int);intMain () {printf ("ooooooo\n"); intA =Ten; intb = -; //The function declaration is not a problem in writing to the function body.//just declare it before the function is used//declaration Method Three    intSumint,int); intresult=sum (A, b); printf ("sum =%d\n", result); return 0;}//functions cannot be defined repeatedly//int sum (int v1, int v2)//{//return v1 + v2;//}//int sum (int v1, int v2)//{//return v1 + v2;//}

Declaration of C-language functions

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.