C
Chad
Given the following.....
#include <stdlib.h>
#include <stdio.h>
struct node {
int data;
struct node *next;
};
int main(void)
{
struct node* head;
head = malloc(sizeof(struct node));
head->data = 1;
head->next = NULL;
head = head->next;
free(head);
return 0;
}
Is struct node *next defintion or declaration?
#include <stdlib.h>
#include <stdio.h>
struct node {
int data;
struct node *next;
};
int main(void)
{
struct node* head;
head = malloc(sizeof(struct node));
head->data = 1;
head->next = NULL;
head = head->next;
free(head);
return 0;
}
Is struct node *next defintion or declaration?