C Language and Pointer learning essays

Source: Internet
Author: User

Encourage yourself to learn with!

--variables are not necessarily stored in memory in the order they are declared

The-->& operator gets the address of the variable (pointer to the variable)
* operator can get the variable of address

int j=ten;     
int *p=&J; Pointer p points to Jint k=*j;

--declaration

int *p;  
int* p; Equivalent
int* P,p1; Cannot declare two pointer variable, second variable is int type

- -on the pointer plus n, the pointer forward "the current pointer to the data type length xn"
-- array subscript starting from 0

int array[];     
array[0]-array[9] //10 elements

-- arrays and pointers

int array[];    
Int

p=array[0
p=array;//pointer p to the array start element address

* (P+i)
P[i]
/* array name [array element]
Array start element address, can be understood as pointer */
array[2];
* (array+2); Both are equivalent

C Language and Pointer learning essays

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.