Notice
Recent Comments
Link
Tags
- node js express install
- c언어 파일 읽기
- Python
- tzselect
- raspi-config
- C언어
- 클라우드서버 생성
- 자바 파일 한줄씩 읽기
- Ubuntu timezone
- ubuntu node js install
- c file read
- mysql index 생성
- 파이썬
- 디지털오션 드로플릿
- 우분투 node js 설치
- node js 버전확인
- 파이썬 반복문
- 디지털오션 서버생성하기
- index 생성
- 라즈베리파이4
- 우분투 시간변경
- java 숫자를 문자로 변환하기
- node 버전확인
- npm버전확인
- 디지털오션 클라우드서버 생성하기
- ubuntu node js
- express install
- Node.js express install
- 우분투 시간설정
- 자바 한줄씩 읽기
Archives
- Today
- Total
호그래머
C 파일 읽기 23.06.29 본문
728x90
1. C언어로 파일 읽기
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
void main()
{
FILE* fp = fopen("C:\\Users\\HO\\Desktop\\test.txt", "r");
char buffer[500] = { 0, };
fread(buffer, 1, 500, fp);
printf("%s \r\n", buffer);
printf("%c \r\n", buffer[0]);
printf("%c \r\n", buffer[1]);
fclose(fp);
}
테스트 파일내용은 ABCDE12345abcd6789 입니다.
결과
728x90
'C' 카테고리의 다른 글
C 비주얼 스튜디오 2022 C프로젝트 생성하기 23.06.25 (0) | 2023.06.26 |
---|
Comments