[공학/컴퓨터/통신] 데이터베이스, c언어
본 자료는 2페이지 의 미리보기를 제공합니다. 이미지를 클릭하여 주세요.
닫기
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
해당 자료는 2페이지 까지만 미리보기를 제공합니다.
2페이지 이후부터 다운로드 후 확인할 수 있습니다.

소개글

[공학/컴퓨터/통신] 데이터베이스, c언어에 대한 보고서 자료입니다.

본문내용

Record(s) Created\\n\");
fprintf(Prof,\"%s %s %s\\n\",ch1,ch2,ch3);
i=fclose(Prof);
if(i!=0)
{
printf(\"file close error\\n\");
return 1;
}
}
else if(strcmp(menu,\"rProf\")==0)
{
Prof = fopen(\"Prof.txt\", \"a+\");
if(Prof==NULL)
{
printf(\"file open error!\\n\");
return 1;
}
i=0;
while(1) {
ck=fscanf(Prof,\"%s %s %s\\n\",ch1,ch2,ch3);
if(ck==EOF)
break;
printf(\"%s %s %s\\n\",ch1, ch2, ch3);
i++;
}
printf(\"%d Record(s) Read\\n\",i);
i=fclose(Prof);
if(i!=0) {
printf(\"file close error\\n\");
return 1;
}
}
else if(strcmp(menu,\"cRelation\")==0)
{
Student = fopen(\"Student.txt\", \"a+\");
Prof = fopen(\"Prof.txt\", \"a+\");
Relation = fopen(\"Relation.txt\", \"a+\");
if(Student==NULL || Prof==NULL || Relation==NULL)
{
printf(\"file open error!\\n\");
return 1;
}
scanf(\"%s %s\",num1, num2);
while(1)
{
ck = fscanf(Student,\"%s %s %s\\n\",ch1, ch2, ch3);
if(ck==EOF)
break;
else if(strcmp(ch1,num1)==0)
break;
}
while(1)
{
ck = fscanf(Prof,\"%s %s %s\\n\",ch4, ch5, ch6);
if(ck==EOF)
break;
else if(strcmp(ch4,num2)==0)
break;
}
if(strcmp(ch1,num1)==0 && strcmp(ch4,num2)==0)
{
fprintf(Relation,\"%s %s %s %s %s\\n\", ch1, ch2, ch3, ch4, ch5);
printf(\"1 Record(s) Created\\n\");
}
i=fclose(Student);
if(i!=0)
{
printf(\"file close error\\n\");
return 1;
}
i=fclose(Prof);
if(i!=0)
{
printf(\"file close error\\n\");
return 1;
}
i=fclose(Relation);
if(i!=0)
{
printf(\"file close error\\n\");
return 1;
}
}
else if(strcmp(menu,\"rRelation\")==0)
{
Relation = fopen(\"Relation.txt\", \"a+\");
if(Prof==NULL)
{
printf(\"file open error!\\n\");
return 1;
}
i=0;
while(1)
{
ck=fscanf(Relation,\"%s %s %s %s %s\\n\",ch1,ch2,ch3,ch4,ch5);
if(ck==EOF)
break;
printf(\"%s %s %s %s %s\\n\",ch1, ch2, ch3, ch4, ch5);
i++;
}
printf(\"%d Record(s) Read\\n\",i);
i=fclose(Relation);
if(i!=0)
{
printf(\"file close error\\n\");
return 1;
}
}
else
{
printf(\"error\\n\");
continue;
}
}
return 0;
}
  • 가격3,000
  • 페이지수8페이지
  • 등록일2012.08.31
  • 저작시기2011.3
  • 파일형식한글(hwp)
  • 자료번호#762703
본 자료는 최근 2주간 다운받은 회원이 없습니다.
다운로드 장바구니