#include #include struct link { int dt; struct link *nxt; }; int main() { int x=1; struct link *start,*node,*temp; node=(struct link*)malloc(1*sizeof(struct link)); start=node; temp=node; scanf("%d",&node->dt); node->nxt=NULL; while(x) { node=(struct link*)malloc(1*sizeof(struct link)); temp->nxt=node; temp=node; puts("enter the data"); scanf("%d",&node->dt); node->nxt=NULL; puts("struct 0 to stop"); scanf("%d",&x); } node=start; while(node!=NULL) { printf("%d->",node->dt); node=node->nxt; } return 0; }