#include using namespace std; struct node { int data; struct node *next; }; int main() { struct node *pre,*head,*p; head=NULL; int n; scanf("%d",&n); for(int i=0;idata); p->next=NULL; if(head==NULL){ head=p; } else { pre->next=p; } pre=p; } int pos; printf("Enter position of number="); scanf("%d",&pos); struct node *ptr=head; int i; while(ptr!=NULL) { ++i; if(i==pos) { pre->next=ptr->next; free(ptr); break; } pre=ptr; ptr=ptr->next; } ptr=head; while(ptr!=NULL) { printf("%d ", ptr->data); ptr=ptr->next; } return 0; }