[(성대)전자전기프로그래밍실습] 보고서6
- 최초 등록일
- 2008.07.07
- 최종 저작일
- 2008.05
- 8페이지/ 어도비 PDF
- 가격 4,000원
소개글
C 프로그램에서 Disk file에 데이터를 출력하는 방법과 Disk file에 들어 있는 데이터를 읽
어 들이는 방법을 연습한다.
목차
1. Introduction
2. Problem Statement
① Describe what is the problem.
② Describe how do you solve the problem.
③ Draw a flowchart of your algorithm
3. Implementation
4. Result
5. Conclusion & Evaluation
6. Source Code (with suitable comments)
본문내용
① Describe what is the problem.
- Program 구조
Program 구조는 비교적 간단하다. 아래는 기본적으로 주어지는 코드로써
readTXTwriteBIN() 함수 및 readBINwriteTXT() 함수의 선언부분으로 시작하여 메인
함수가 주어져 있다. 메인 함수에서는 우선 input_file과 binary_file, output_file의 파
일명이 문자열형태로 저장된다. 그리고 readTXTwrite() 함수를 호출하고 1(True)의 값
을 리턴 받지 못하면 프로그램을 종료한다. 문제없이 함수가 종료되면 “Read text file
and write to binary file”이라는 문구를 출력하고 readBINwriteTXT() 함수를 호출한다.
마찬가지로 1(True)의 값을 리턴 받지 못하면 프로그램을 종료하며, 문제없이 함수
호출을 완료했다면 “Read binary file and write to text file.”을 출력한다.
#include
int readTXTwriteBIN(char *, char *);
int readBINwriteTXT(char *, char *);
void main()
{
char *input_file = “infile.txt”;
char *binary_file= “binary.dat”;
char *output_file = “outfile.txt”;
if(!readTXTwriteBIN(input_file, binary_file))
참고 자료
없음