1. uninitialized pointer-serious error. Note!
E. g: int *;
* A = 1; // we do not know where the pointer variable A points!
* Out-of-bounds pointers and pointers pointing to unknown values are the root cause of common errors!
3. Forcibly convert an integer constant to create a pointer constant;
E. g: int * PTR;
PTR = (int *) 1;
4. If pointer point to same array, pointer variable cocould use addition and subtraction, comparison operators, to determine their relative positions in the array.
5. Note that you cannot pass a null pointer to a function, which makes no sense. A pointer is passed to a function to solve the problem that the function can return only one value, and it is also a one-way value transfer. With pointers, the function can return more than two values. The essence is to change the value in the variable address of the main call function in the stack of the sub-function.
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