두개이상의 단순연결리스트를 연결하는 프로그램
- 최초 등록일
- 2009.09.22
- 최종 저작일
- 2004.09
- 3페이지/ 한컴오피스
- 가격 2,000원
소개글
자료구조 C언어 알고리즘 실습시간에 직접 짠 소스코드와
비주얼씨 결과 캡춰화면입니다.
목차
없음
본문내용
#include<stdio.h>
#include<malloc.h>
#include<string.h>
typedef struct node{
char data[4];
struct node *link;
}node_str;
node_str *ptr = NULL, *x_list=NULL, *y_list=NULL;
void display_list(node_str *ptr)
{
node_str *p;
p = ptr;
printf("ptr",p->data);
while(p != NULL){
printf("---->%s",p->data);
p=p->link;
}
}
void delete_list()
{
node_str *ptemp;
while(ptr!=NULL)
{
ptemp=ptr->link;
free(ptr);
ptr = ptemp;
}
}
node_str *reverse(node_str *p)
{
node_str *temp, *tail;
temp = NULL;
참고 자료
없음