Code:
#include <stdio.h>#include <stdlib.h>
typedef struct noode
{
    int data;
    struct noode *next;
}node;
void insertf(node **head,int data)
{
    node* newn=malloc(sizeof(struct noode));
    newn->data=data;
    newn->next=*head;
    *head=newn;
}
void insertm(node *prev ,int data)
{
    node * newn=malloc(sizeof(struct noode));
    if(prev == NULL)
        printf("\nno more space for the data to be inserted");
    newn->data=data;
    newn->next=prev->next;
    prev->next=newn;


}
void insertl(node** head,int data)
{
     node *last=*head;
    node* newn = malloc(sizeof(struct noode));
    newn->data=data;
    if(*head==NULL)
    {
        *head=newn;
    }
    while(last->next!=NULL)


        last=last->next;
    last->next=newn;
}
void print(node *nod)
{
    while(nod != NULL)
    {
        printf("%d ",nod->data);
        nod=nod->next;
    }
}
int main()
{
    char choice,data;
    node *head=NULL;
    do
    {
        printf("\n 1 insert element at first");
        printf("\n 2 insert element at middle ");
        printf("\n 3 insert the element at the last");
        printf("\n 4 display");
        printf("\n 5 exit");
        printf("\nenter the choice");
        scanf(" %c",&choice);
        switch(choice)
        {
            case 1: printf("insert element at first");
                    scanf(" %c",&data);
                    insertf(&head,data);
                    break;


            case 2: printf(" insert element at mid");
                       scanf(" %c",&data);
                       insertm(head->next,data);
                       break;
            case 3: printf("insert the element at last");
                    scanf(" %c" ,&data);
                    insertl(& head,data);
                    break;
            case 4 : print(head);
                       break;
            case 5: break;
            default: printf("not a choice");
                      break;
        }
    }while(choice !=5);
    return 0;
}
the values are not being switched inside the switch case structure,it asks for my choice and then always ends up at the default case, no matter what choice you enter . How can I fix this?