A pointer to a classic face test in C + +

Source: Internet
Author: User
Tags integer numbers

a) An integer number (an integer)
b) A pointer to the integer number (a pointer to an integer)
c) A pointer to a pointer to a pointer that points to a number of integers (a pointer to a pointer to an intege) r
d) An array of 10 integers (an arrays of ten integers)
e) An array of 10 pointers that point to an integer number. (An array of ten pointers to integers)
f) A pointer to the array of 10 integer numbers (a pointer to an array of ten integers)
g) A pointer to the function that has an integer parameter and returns an integer number (a pointer to a function this takes an integer as an argument and returns an integer)

h) An array of 10 pointers that point to a function that has an integer parameter and returns an integer number (an array of ten pointers to functions that taking an integer argument and retur n an integer)


Answer:
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 ten integers
e) int *a[10]; An array of ten pointers to integers
f) Int (*a) [10]; A pointer to an array of ten integers
g) Int (*a) (int); A pointer to a function A, takes an integer argument and returns an integer
h) int (*a[10]) (int); An array of ten pointers to functions A, a integer argument and return an integer

A pointer to a classic face test in C + +

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.