Реферат: Программирование на языках высокого уровня 3
output(p->pc);
}
void add_head (long value)
{
count++;
list *old_head=head;
head=(struct list *)malloc(sizeof(struct list));
head->next=old_old_head;
head->value=value;
}
void insert (int pos,long value)
{
list *target;
list *old_next;
int i=0;
if(head!=NULL)
{
target=head;
while((i<pos)&&(target!=NULL))
{
target=target->next;
i++;
}
if(i!=pos) return;
old_next=target->next;
target=target->next=(struct list *)malloc(sizeof(struct list));
target->value=value;
target->next=old_next;
count+;