i did't get your problem plaese clearify more ...
whatever i got see this code

In File "tree_stack.c"
Code:
#include<stdio.h>

struct node
{
 int element;
 struct node* next;
};
in File "tree_stack.c"

Code:
#include <stdio.h>
#include "test.c"

extern struct node* nd;
struct st
{
 struct node* nd;
 struct st* nxt;
};

int main()
{
  struct st* curr;
  int data=curr->nd->element=10;
  printf("%d",data);
  
  return 0;
}
But this is not giving error ...
Try it or any thing else reply ...
Note: i have not allocated on heap, this is just for your answer...