Reading Notes OFC traps and pitfalls

Source: Internet
Author: User

Chapter 1

1. = not equal to =

2. & | different from & |

3. Greedy method in lexical analysis

A --- B and a ---B have the same meaning.

C LanguageLexical Analysis Rules: each character should contain as many characters as possible, that is, one character from left to right to be read. If the character may constitute a symbol, then read the next character, if not, stop the operation and use the characters that can constitute the operator that have been read as an operator.


The meaning of a ++ B is that, although the lexical analysis of a ++ B is like this, a ++ cannot be used as the left value of ++ operations, therefore, an error is reported during compilation of this expression.


4. Integer constants

If the first character is 0, the constant is considered octal.

5. In C language, the character enclosed in single quotes actually represents an integer, that is, the ASCII code of the character. Therefore, the meaning of 'A' is strictly consistent with that of 0141 or 97.

A string enclosed by double quotation marks indicates a pointer pointing to the starting character of an unknown array, this array is initialized by characters between double quotation marks and an extra binary value of 0 'and 0.


Chapter 2


1. Understand the function declaration

Float g and float (g) have the same meaning. They all declare a float type variable G,

Brackets can be used randomly outside G.

The same logic can also be used to declare functions and pointer types.

 

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.