Introduction to the basic structure of C Language

Source: Internet
Author: User

Introduction to the basic structure of C Language

1. The main function is a program entry. A program can only have one main () function, and an integer return value is required. (In fact, the return value int can be omitted, but this does not mean that the return value is not, the default value is int. We can also not provide return in the main () function, because the C language syntax is not strict enough );

 

2. # include is a pre-processing command used to include a specified file (which must be processed before compilation). The actual task is to copy the corresponding file to the specified location; the content can be any type of file, not just. h file;

 

3. The above showMessage function must be written on the main () function. If it is written below, it must be declared before the main () function;

 

Note: # There are two methods to include files: <> and "". The difference is that <> contains only the compiler library function file, so it is applicable to include library functions. "" contains the current directory of the program first. If not, it searches for the library function path, this applies to custom files;

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.