I have the following struct I would like to initialize:
typedef struct Node {
struct Node *next;
int data;
}Node;
And the following function prototype I need to use to initialize it(using dynamic memory allocation):
void initialize_node(Node *in){
in= calloc(1, sizeof(Node));
}
After the function call ends, in is still not initialized. How do i fix this?