How to identify abnormal C statements?

Source: Internet
Author: User

C language programs often encounter abnormal statements. After learning an article on msdn, I am very enlightened.

Char * (* var) () [10];
^
7 6 4 2 1 3 5

1. var is defined

2. A pointer pointing to 3

3. A function with a return value of 4

4. A pointer pointing to 5

5. A one-dimensional array with 10 variables. It has 6

6. Point to 7

7. Char type value.

Coherent: VaR is defined as a pointer to a function that points to a return value and points to a one-dimensional array with 10 variables and points to a char-type value.

Although I cannot understand it, it means that. The rule is as follows: high priority prevails over low priority, and right is prior to left.

Continue reading the article, the content is similar, and so on, you can see if the following content is the same as the article http://technet.microsoft.com/zh-cn/library/1x82y1z4 (V = vs.85). aspx.

Int * var [5];

INT (* var) [5];

Long * var (Long, long );

Long (* var) (Long, long );

Struct both {int A; char B;} (* var [5]) (struct both, struct both );

Unsigned int * (* const * name [5] [10]) (void );

Double (* VAR (double (*) [3]) [3];

Union sign {int X; unsigned y;} ** var [5] [5];

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.