2015.12.10 hands

Source: Internet
Author: User

The "rendering" that you hear before learning the pointer is this: the pointer is the hardest. The feeling that comes after touching the pointer today is, "well! That's it! ”

A pointer is a special variable ( A pointer is also a variable ), and the value stored in it is interpreted as an address in memory. To make sense of a pointer, you need to understand the four aspects of the pointer: the type of the pointer, the type the pointer is pointing to, the value of the pointer, or the memory area called by the pointer (the name of the array is actually an address, pointing to the first address of the array), the memory area occupied by the pointer itself (32 bits 4 64 bits of 8 characters).

Note: pointers can only point to a block address and cannot be given a constant value .

int *p = 10; This is a mistake!

& Address Eg:&a Get the address of a

int *p = &a; This is the right definition.

* Role of the number: 1. Define a pointer variable.

2.* (pointer variable) Gets the value of the variable pointed to by the pointer.

        

  

17:51:35

2015.12.10 hands

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.