The understanding of C language

Source: Internet
Author: User

C language is a general-purpose structured language. Its universality and unrestricted nature make it more popular and effective for many programmers. Whether it is the system software or data processing, non-numerical calculation, etc., can be very convenient to use C language.

The main features of C language:

1: Concise, compact, flexible.

2: Modular, structured.

3: Strong portability.

4: Generate target code high quality, program execution efficiency.

c The composition of the program:

A C program is usually made up of functions, statements, annotations, pre-processing commands, and other basic parts.

1: Function

C programs are composed of functions, a C program and only one main function. You can also have a main function that consists of several other functions, all of which are executed directly or indirectly by the main function.

2: Statement

C Language Program code, a statement can be divided in a few lines, one line can also write multiple statements, each statement separated by semicolons, each statement followed by a semicolon separated. In a function, statements are divided into declaration statements and execution statements. 、

3: Notes

Note of the program is very important in the process of writing a program, a non-annotated program like a non-description of the software, so in the process of writing a program, writing a good comment is a very good habit.

4: Preprocessing command

Common preprocessing commands are divided into two types

The ①include command, also called the file contains a command, is to introduce a text file into the program at that point where the text file contains definitions of many functions.

② #define用来定义一个符号常量. Example: #define PI 3.1415923 with pi instead of 3.1415926 in the file

The understanding of C language

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.