Dark Horse Programmer---iOS learning log 3

Source: Internet
Author: User

------<a href= "http://www.itheima.com" target= "blank" >java training, Android training, iOS training,. NET training </a>, look forward to communicating with you! -------

C Language Learning

1, the basic concept of keywords

Keywords are words that have been used by the C language itself and are not intended for other purposes.

A total of 32 keywords in C language

Auto Double int struck break else long switch case enum register typedef char extern return

Union Const float Short unsigned continue for signed void default goto sizeof volatile do if

While static

Keywords for data type:

A. Basic data Type (5)

void: Declares a function with no return value or no argument, declares an untyped pointer, displays the result of the discard operation

Char: Character type data, which belongs to a kind of shaping data

int: Shaping data, usually the machine word length specified by the compiler

FLOAT: single-precision floating-point data, a type of floating-point data

Double: dual-precision floating-point data, which is a type of floating-point data

B. Type modifier keywords (4)

Short: modifier int, shorter integer data, can omit the modified int

Long: modifier int, length integer data

Signed: Modifying integer data, signed data type

Unsigned: Modifying integer data, unsigned data type

C. Complex Type Keywords (5)

struct: struct declaration

Union: Common Body Declaration

Enum: enum declaration

typedef: Declaring type aliases

sizeof: Getting the size of a particular type or variable of a particular type

D. Storage level Keywords (6)

Auto: Specified as an automatic variable, automatically allocated and freed by the compiler. Usually allocated on the stack.

Static: Specifies that the function is scoped to the file when it is assigned the static variable, and when the function is modified

Register: Specified as a register variable, it is recommended that the compiler either store the variable in the Register or modify the function parameters, suggesting that the compiler pass the data through the register instead of the stack

Exterm: Specifies that the corresponding variable is an external variable, that is, the definition of the marked variable or function in another file, prompting the compiler to look for definitions in other modules when encountering this variable and function.

Const: With volatile collectively "CV attribute", specified variable cannot be changed by current thread/process (but may be changed by system or other thread/process)

Volatile: As with volatile, the "CV attribute", the value of the specified variable may be changed by the system or other process/thread, forcing the compiler to get the value of the variable from memory every time.

Dark Horse Programmer---iOS learning log 3

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.