Language/C
[따배씨] 16.2 전처리기를 준비하는 번역 단계
migrationArc
2021. 8. 4. 22:05
따배씨 - 따라하며 배우는 C언어
16강 전처리기와 라이브러리
16.2 전처리기를 준비하는 번역 단계 Translation phase
#include <stdio.h>
int main()
{
/*
Program written in C
Translating - 전처리기의 앞에서 이루어 지거나 전처리기에 포함된 과정으로 혼용하여 봄
Preprocessing
Compiling - Compiler 가 모두 처리한다는 표현으로 사용하기도 함
Linking
Executable
*/
/*
International characters
*/
puts("안녕하세요? 한글입니다.\n");
// 국제 다국어로 작성된 코드를 내부적으로 Translating 단계에서 이해 할 수 있는 문자 집합으로 처리
/*
Trigraph Sequences
- Some keyboards don't provide all the symbols used in C.
- Three-character sequences
Trigraph Replacement
??= #
??/ \
??' ^
??( [
??) ]
??! |
??< {
??> }
??- ~
/Zc: trigraphs
*/
int arr[3] = {1, 2, 3};
printf("arr[0] == %d\n", arr[0]);
// printf("arr??(0??) == %d\n", arr??(0??));
/*
Digraphs
- Two-Character sequences
Digrapsh Equivalent
<: [
:> ]
<% {
%> }
%: #
*/
printf("arr[1] == %d\n", arr[1]);
//printf("arr<:1:> == %d\n", arr<:1:>);
/* Two physical lines vs One logical line */
printf("This is a very very very very very very very very\
long long long\n");
/*
Tokens
- Groups separated from each other by spaces, tabs, or lines breaks
Whitespace charaters -> a single space
*/
int /* a variable to count a number*/ n = 1;
// int n = 1;
// 권장하지 않음
return 0;
}
이 글의 모든 사진과 내용의 출처는 홍정모 교수님께 있음을 알려드립니다.
http://blog.naver.com/atelierjpro
실리콘 밸리의 프로그래머 : 네이버 블로그
안녕하세요! 홍정모 블로그에 오신 것을 환영합니다. 주로 프로그래밍 관련 메모 용도로 사용합니다. 강의 수강하시는 분들은 홍정모 연구소 카페로 오세요.
blog.naver.com
http://www.inflearn.com/course/following-c
홍정모의 따라하며 배우는 C언어 - 인프런 | 강의
'따배씨++'의 성원에 힘입어 새롭게 개발된 C 언어로 시작하는 프로그래밍 입문 강의입니다. '따배씨'와 함께 프로그래밍 인생을 업그레이드 해보세요., 따라하며 배우는 C언어 '따배씨++'의 성원
www.inflearn.com