Link list problem

xiaoxiao2021-03-05  22

After a few years ago, I read Tan Haoqiang's "C Language", but the structure is a known semi-solving, I think it is, now I have discovered it, I found that I didn't just understand the "C algorithm".

# include typedef struct node * link; struct node {int item; link next;} main () {INT i, n = 9, m = 5; float a; link t = malloc (SizeOf * t) , x = T; t-> item = 1; t-> next = t; for (i = 2; i <= n; i ) {x = (x> next = malloc (sizeof * x)); x -> item = i; x-> next = T;} while (x! = x-> next) {for (i = 1; i next; x-> next = x -> Next-> Next; N -; "% d / n", x-> item);

This is the source code in the book. I didn't understand X = (x-> next = malloc (sizeof * x)); later, I learned the X and X-> NEXT pointer (address).

转载请注明原文地址:https://www.9cbs.com/read-35164.html

New Post(0)