본문 바로가기

프로그래밍/Study C7

PreProcessing The Compliation Process PreProcessor는 source code 가 translator 에서 object code 로 translate 되기 전에 run 한다. tokens 문자에만 반응한다. ex # 코드들을 치환시킨다. Preprocessed output files 는 .i 파일로 나타난다. 파일을 보기위한 명령어는 Clang, gcc, Visual C++ 별로 command 가 다르다. File Inclusion #include 어떤 source file의 내용을 다른 source file 에 insert 할 수 있다. insert 하는 파일을 header file 이라 칭한다. #include 컴파일러 라이브러리 폴더 #include "foo.h" 현재 디렉토리 -> 파일.. 2022. 10. 17.
Buffer 버퍼의 역할 ● 프로그램 지연 방지 Stream Buffering Buffering is the process of temporarily storing data in main memory that’s passing between a process and a device or file. Buffering improves the throughput of I/O operations, which often have high latencies. Similarly, when a program requests to write to block-oriented devices like disks, the driver can cache the data in memory until it has accumulated enoug.. 2022. 10. 11.
I/O Stream ● Wide Character 는 왜 존재하는가? UTF-16 이 보편화, Unicode의 등장, 다른 Character 인코딩 형식의 등장 이전의 C 언어는 8bit 로 문자를 표현했다.? 정확히는 main function에서 일반적으로 argument를 ANSI라고 불리는 형식으로 받았었지만 UniCode 가 등장한 후에는 16bit, 32bit의 형식이 나타났고, 따라서 wide character 라는 형식이 필요해졌다. ● Binary Stream vs Text Stream 한 가지만 쓰지 왜 2가지로 나누어 사용하는가? Binary Stream 이 훨씬 범용적이다. Text Stream이 읽지 못하는 것을 Binary Stream으로 해결할 수도 있다. text stream은 254 charac.. 2022. 10. 11.