Review of the written examination of the school recruit--pointer array and array pointer

Source: Internet
Author: User
Tags integer numbers

First, look at a set of definitions

1. An integer number int A;

2. A pointer to an integer number int *a;

3. A pointer to a pointer pointing to a pointer to an integer number int **a;

4. An array of 5 integers int a[5];

5. An array with 5 pointers pointing to an integer int *a[5];

6. A pointer to an array of 5 integer numbers int (*a) [5];

7. A pointer to a function that has an integer parameter and returns an integer number int (*a) (int);

8. An array of 5 pointers to a function that has an integer parameter and returns an integer number int (*a[5]) (int);

Overall:

Pointer array: An array of pointers, representing an array, and each element of the array is a pointer type.

Array pointer: A pointer to an array that represents a pointer and a pointer to an array.

Second, several pen questions

1.int **a[3][4], how much space this array occupies

Parse: This is a two-bit 3*4 size array of pointers

Each pointer occupies 4 bytes, and the array has a total of 3*4 elements

Result: 4*3*4=48 bytes

2.

To be Continued ...

  

Review of the written examination of the school recruit--pointer array and array pointer

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.