Understand the priority rules declared in C Language

Source: Internet
Author: User

A declares that it reads data starting from its name and then reads data in order of priority.

The priority of B is from high to low:

Section enclosed in brackets in B. 1 Declaration

B. 2 suffix OPERATOR:

Parentheses () indicate that this is a function, and

Square brackets [] indicate that this is an array

B .3 prefix OPERATOR: Model * indicates "pointer ".

C If the const and volatile keywords follow the type specifiers (such as int and long), it acts on the type specifiers. In other cases, the const and volatile keywords apply to the pointer asterisks next to it.

For example, int * a [2]: first, a is an array, and the content of the array is a pointer to the int.

Another example is char * (* c [10]) (int ** p): c is an array [0 .. 9]. Its element type is a function pointer. the return value of the function to which it points is a pointer to char, and the parameter of this function is a two-dimensional int pointer.


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.