32 keywords in C Language

Source: Internet
Author: User

The so-called keyword is also called a reserved word. It is a type of identifier. The standard stipulates that it is the default type of the compiler. Therefore, users cannot use its same identifier to represent other things. Standard C has 32 keywords: one data type keyword 12: 1. char 2. short 3. int 4. long 5. enum 6. float 7. double 8. signed 9. unsigned 10. struct 11. union 12. void two control type keywords 12 loop statements 1.for 2.do 3. while 4. break 5. continue Condition Statement 6.if 7. else 8. goto switch statement 9. switch 10. case 11. default return statement 12. return three Storage types 4 1. auto // declare automatic variables, which are generally not used. Local variables are auto type 2 by default. static // declare static variables 3. extern // declare an external variable 4. register // declare register variable 4 other keywords 4 1. const // Declare Read-Only variables 2. sizeof // operator, memory occupied by computing data 3. typedef // custom type 4. volatile // The modified variables may change. Do not use define and include as keywords. They are only precompiled pseudo commands .. The C99 standard adds five more keywords, namely, restrict, which can only be used to restrict and constrain pointers. It also indicates that pointers are the only and initial inline restrained functions for accessing a data object, in C ++, It is a macro-defined optimization implementation method _ Bool unsigned int type, which is defined as Boolean in C99, only two values_1 and two values_complex Complex classes _ Imaginary pure virtual number type C11 standard added a keyword _ Generic type on the basis of C99

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.