About pointer, mouse pointer

Source: Internet
Author: User

About pointer, mouse pointer

1,All basic data types are eventually interpreted as binary codes. That is to say, given a binary code, it may be mapped to an int or a char, float, double and other data types.
2,After a pointer is declared, the operating system does not allocate space for it. Therefore, Initialization is required before the access pointer.
3,If you know why the pointer is initialized, initialize it to this address; otherwise, it is initialized to NULL. A program with good style will check it before the pointer is referenced. This initialization policy can reduce the debugging time.
4,The left value indicates the object stored in computer memory, and the left value is equivalent to the address value. Right Value: When a symbol or constant is placed on the right of the operator, the Computer Reads their "right value", which is the actual value. The right value is equivalent to the data value.
5,& A can only be used as the right value.
6,Define char * string; then the expression * string ++ executes the process: (1) ++ operator generates a copy of string (2) then ++ operator increases the value of string (3) finally, perform the indirect access operation on the string copy.
This expression is often used in loops! Note: ++ operator has a higher priority *
7,The pointer array ends with a NULL pointer.
** 8, ** p is a pointer, and the result of p + 1 (pointer and integer addition) is irrelevant to the type. If p is int, an int is added to p, which is four bytes. If p is char, a char is added to p.

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.