Basic grammar of C language

Source: Internet
Author: User

1,c Tokens (Tokens)

printf ("Hello, world! \ n");  

These five tokens are:

printf ("Hello, world! \ n");

2, semicolon is the Terminator of the statement
3, note is */* sub-language Comment */(note that annotations cannot be nested)

4, the identifier C identifier is the name used to identify the variable, function, or any other user-defined item. An identifier begins with a A-Z or a-Z or underscore, followed by 0 or more letters, underscores, and numbers (0-9).

5, keyword

auto else long switch
break enum register typedef
case extern return union
char float short unsigned
const for signed void
continue goto sizeof volatile
default if static while
do int struct _packed
Double

Spaces in the 6,c

A line that contains only spaces, called a blank line, may have comments, and the C compiler ignores it completely.

in C, spaces are used to describe whitespace characters, tab characters, line breaks, and comments. Spaces separate the parts of the statement so that the compiler can recognize where an element in the statement (such as int) ends and where the next element begins. Therefore, in the following statement:

Keywords in 7,c

Start by year:

    • Auto      break     case       Char   ;    const         Continue  default     do 
    • Double  else       enum      extern   Flo At           for             Goto         IF&NB SP;
    • int long register return short signed sizeof static 
    • struct   switch    typedef  union    unsigned &nbs P;void            volatile   while

December 16, 1999, ISO introduced the C99 standard, which added 5 C language keywords:

    • inline    restrict    _bool   _complex    _imaginary< /li>

December 8, 2011, ISO released the new standard for C language C11, which added 7 C language keywords:

    • _alignas _alignof _atomic _static_assert _noreturn _thread_local _generic

Basic grammar 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.