GPT Promp Refs
GPT Promp Refs
#include <stdio.h>
#include <stdlib.h>
struct Node {
int data;
struct Node* next;
};
if (*head_ref == NULL) {
*head_ref = new_node;
return;
}
last->next = new_node;
}
int main() {
struct Node* head = NULL;
append(&head, 1);
append(&head, 2);
append(&head, 3);
printList(head);
return 0;
}