씨
STDIN을 통해 공백으로 구분 된 목록으로 입력하고 STDOUT을 통해 공백으로 구분 된 목록으로 출력합니다.
Dear Boss,
I have made for you a decision about my employment a t your company. At about noon
a letter explaining this shall be presented to you, as I am a lazy person. As you
are a fool, I will say no more. And I look forward to never seeing you again.
Insincerely,
Steward Pitt
다음과 같이 컴파일해야합니다.
gcc bossletter.c -o bossletter -Dam='+++' -Dwill='---' -Dthis='{' -Dhave=';'
-Ddecision=',' -Dquit='*' -Dfor='(' -Dmy=')' -Dbrain='}' -Dlie=']' -Dnoon='-quit'
-DD='' -Dto='D' -Dyou='D' -Dfool='you' -Das='to' -Dday='D' -Dno='fool' -Dcake='Pitt'
-Dlook='you' -DPitt='the' -Dthe='as' -DBoss='a[9999 lie' -DAs='a have' -Dlazy='my'
-Dperson='lazy have company' -Dyour='this' -DInsincerely='a' -Dcompany='b'
-Demployment='int quit' -DDear='struct this employment a have brain b have'
-Dbe='scanf for' -Dis='I[' -Dnever='for presented " " decision' -Dthat='4 decision'
-Dagain="my have b" -Dt='decision quit about have' -Dshall='while for'
-Dpresented='"%" to "d"' -Dletter='have brain' -DAt='a have return quit'
-Dmore='have b' -DAnd='a have shall' -Dare='qsort for' -Dforward='--my printf'
-Dexplaining='main for my'
-Dsay='1 decision that made my day'
-DSteward='Boss have no brain'
-Dseeing='the cake is a lie'
코드는 다음과 같이 확장됩니다.
struct{ int *a; } b;
a[9999], I;
made(a, about) int *a, *about; {
b.a;
return *about - *a;
}
main(){
while(scanf("%d", I++ + a));
b.a;
qsort(a, I-- - 1, 4, made);
b.a;
while(I--) printf("%d ", I[a]);
b.a, a[9999];
}