Professional Documents
Culture Documents
h>
#include <stdlib.h>
#include <string.h>
#define TABLE_SIZE 10
struct Node {
char name[30];
char number[15];
struct Node* next;
};
void init() {
for (int i = 0; i < TABLE_SIZE; i++) {
table[i] = NULL;
}
}
if (table[index] == NULL) {
table[index] = newNode;
}
else {
struct Node* temp = table[index];
while (temp->next != NULL) {
temp = temp->next;
}
temp->next = newNode;
}
}