C-language double pointer in-depth understanding

Source: Internet
Author: User

K->[SSS]------>k is a pointer to the memory area, the memory area of the data is SSS, then *k is the content of SSS (*K) <==>sss

SSS->[HHH]---->SSS is a new address, is a pointer to the memory area, the memory area of the data is HHH, then the *sss content is HHH (*sss) <==>hhh

In summary, the double pointer (* (*K)) =====> is equal to HHH

That is, take the contents of the K address as a new address, and then fetch the contents of this new address

2, thinking linked list

Actually, it's like the list.

typedef struct NODE

{

int num;

Node*point;

};

struct node * head;

int num1=5;

int num2=6;

int num3=7;

int num4=8;

(*head). Num=num1;

struct node second;

(second). Num=num2;

(second). Node=null;

(*head). Node=*second;

(*head). node//This is based on an address, take the contents of the address

(* (*head). node). num//This is based on this new address, to fetch the corresponding data,

Plainly, it's a double pointer.

C-language double pointer in-depth understanding

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.