getting unknow type error, something like segmentation fault(code dumped) : I am new to data structure and i am trying to implement link list data structure,i am getting segmentation fault(core dumped), during run time.I am using linux terminal to compile and run the program. I have written a insert_element() function to insert function at the beginning and a recursive function print() to print the list.Plz..help me.Thanks in advance.

    struct node{
            int data;
            struct node* link;
    };

    struct node* insert_element(struct node* A,int ino)
    {
            struct node *temp=(struct node*)malloc(sizeof(struct node));
            temp->data=ino;
            temp->link=NULL;
            if(A=NULL)
            {
            A=temp;
            }
            else
            {
                    struct node* temp1=A;
                    while(temp1->link!=NULL)
                    {
                            temp1=temp1->link;
                    }
                    temp1->link=temp;
            }
            return A;
    }

    void print(struct node* ptr)
    {
            if(ptr==NULL)
                    return;
            printf("%d",ptr->data);
            print(ptr->link);
    }

    int main()
    {
            struct node* head=NULL;
            head=insert_element(head,5);
            head=insert_element(head,5);
            head=insert_element(head,6);
            head=insert_element(head,3);
            head=insert_element(head,5);
            print(head);
            return 0;
    }

