C Language 32 Keywords

Source: Internet
Author: User

There are 32 keywords in C, according to the function of the keyword, it can be divided into four categories: data type keyword, control statement keyword, storage type keyword and other keywords.

First, data type keywords (12):  

(1) Char: Declaring a character variable or function

(2) Double: declares a double-precision variable or function

(3) Enum: declaring enum type

(4) Float: Declare a floating-point variable or function

(5) Int: Declaring an integer variable or function

(6) Long: Declares a long integer variable or function

(7) Short: Declare a variable or function

(8) Signed: Declaring a signed type variable or function

(9) struct: declares struct-body variable or function

Union: declaring Union data types

(one) unsigned: declaring an unsigned type variable or function

void: Declares a function with no return value or no argument, declares an untyped pointer

Second, the control statement keywords (12):

A, the Loop statement:

(1) For: a looping statement

(2) Do: loop body of Loop statement

(3) While: loop condition of the loop statement

(4) Break: Jump out of the current loop

(5) Continue: End the current cycle and start the next cycle

B, conditional statement:

(1) if: Conditional statement

(2) ELSE: Conditional statement Negation branch (with IF)

(3) Goto: Unconditional Jump Statement

C, switch statements:

(1) Switch: for switch statements

(2) Case: switch Statement Branch

(3) Default: "Other" branch in the switch statement

D, return statement:

(1) Return: Subroutine Return statement (can take parameters, also see without parameters)

Three, storage type keywords (4):

(1) Auto: Declares that automatic variables are generally not used

(2) extern: Declaring a variable is declaring it in another file (and can also be seen as a reference variable)

(3) Register: Declare the variable of the accumulation device

(4) Static: Declaring a static variable

Iv. other Keywords (4):

(1) Const: Declaring read-only variables

(2) sizeof: Calculate data type length

(3) typedef: Used to alias data types

(4) Volatile: Explanatory variables can be implicitly changed in program execution

C Language 32 Keywords

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.