Use variable a to give the following definition

Source: Internet
Author: User

A) An integer)
B) A pointer to an integer (A pointer to an integer)
C) A pointer to a pointer pointing to an integer (A pointer to a pointer to an integer)
D) An array of 10 integers (An array of 10 integers)
E) An array with 10 pointers pointing to An integer (An array of 10 pointers to integers)
F) A pointer to an array with 10 integers (A pointer to an array of 10 integers)
G) A pointer to a function. The function has an integer parameter and returns an integer number (A pointer to a function that takes an integer as an argument and returns an integer)
H) An array with 10 function pointers pointing to a function, this function has An integer parameter and returns an integer (an array of ten pointers to functions that take An integer argument and return an integer)

The answer is:

A) int a; // An integer
B) int * a; // A pointer to an integer
C) int ** a; // A pointer to a pointer to an integer
D) int a [10]; // An array of 10 integers
E) int * a [10]; // An array of 10 pointers to integers (int * faces the array after modification)
F) int (* a) [10]; // A pointer to an array of 10 integers
G) int (* a) (int); // A pointer to a function a that takes an integer argument and returns an integer
H) int (* a [10]) (int); // An array of 10 pointers to functions that take an integer argument and return an integer

 

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.