Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

c linked list

// https://github.com/davidemesso/LinkedListC for the full
// implementation of every basic function

typedef struct Node 
{
  // Void pointer content of this node (to provide multityping).
  void* data;

  // Points to the next Node in the list.   
  struct Node* next;  
} Node;

Node *llNewList(void* data, Node* next)
{
    Node* result = 
        (Node*)malloc(sizeof(Node));

    result->data          = data;
    result->next          = next;
    
    return result;
}
Source by www.chegg.com #
 
PREVIOUS NEXT
Tagged: #linked #list
ADD COMMENT
Topic
Name
3+7 =