Sunday, October 27, 2019

Why do we need pointers in C implementation of a linked list?

Why is it important to use pointers in an implementation of linked lists in C?



For example:



typedef struct item                                     

{
type data;
struct item *next;
} Item;

typedef struct list
Item *head;
} List;



What would happen if Ill use the same implementation just without the pointers?

No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...