C Language--Overview

Source: Internet
Author: User

#include指示和头文件

Example: #include <stdio.h>

    1. Function: Equivalent to the full content of the file stdio.h that you typed in the file, where the line is located
    2. #include语句是: C preprocessor directive (Purpose: C compiler to prepare the source code before compiling, so called preprocessing)
    3. . h= header files (different header files typically contain a number of different function functions, and the header file contains the information required by the compiler to build the final executable program)

Main () function

    1. A program has and only one, and can only have a main () function

Variable declaration

    1. All variables in C must be declared before use, defined

Benefits: Easy to read, easy to understand, avoid errors, do not declare variables will not compile your C!!!

Data type

    1. Data type: integer int float float character char, specifying variable as specified data type

Selection of variable names

    1. The naming of names has meaning
    2. The naming of names requires the following rules: lowercase letters, uppercase letters, numbers, underscores! (Remember: The first character must be a letter or a glide line)

Assign value

Assignment operator: "="

A simple program structure:

    1. preprocessing directives
    2. Function name with parameters
    3. Statement statement
    4. Assignment statements
    5. Function statements

C Language--Overview

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.