[C언어] 파일 입출력 함수정리
- 최초 등록일
- 2014.01.10
- 최종 저작일
- 2009.05
- 2페이지/ MS 워드
- 가격 1,000원
소개글
C언어로 파일 I/O 프로그램을 짤 때 함수들의 파라메터나 리턴값, 또는 그 역할이 잘 기억나지 않을때가 많습니다.
이 파일은 2페이지 짜리 표로 되어있고, 자주 쓰는 파일 I/O 함수만 정리되어 있습니다.
프린트 하셔서 걸어놓고 코딩할 때마다 한번씩 보면 유용할 것입니다.
목차
없음
본문내용
함수명
Parameters
return value
비고
FILE *fopen
const char *filename
const char *mode
NULL if failed in accessing
ptr to file if successful
Mode:
- file position is set to beginning if "r" or "w" and
but set to the end if "a"
- if "a" or "w" and the file does not exist, it's created.
- "+" is added to indicate the update node (both
reading and writing).
- "b" is added to open a binary file
- (ex: "rb+" to open binary file for both read & write)
- 주: update mode 에서 read 뒤에 fseek, fsetpos, 또는 rewind 가 온 뒤에야 write 가 올수 있음.
- 주: update mode 에서 write 다음에는 , fflush,
fseek, fsetpos, 또는 rewind 가 온 뒤에야
read 가 올 수 있음.
참고 자료
없음