 3     2 C !#"$,.%'&)-(+* 46/1035 2
7 1 8 9 2003 : 6 ; 16 <>=7 2 8 9 2004 : 6 ; 14 <>=A? @CBEDGF}C~pHJpILyKNM>OQ PCRNSE TV UX]WZcY>n[QX\.Z]_c^a `cfbQndfCeJgGhj ilufkn[CmcdZopQh>saqXorlitpsJufC[Z hlvZwyxLz|{ dL^ W
>Q ^. ^  a  hLHXIlKjM O¡P |¢£¡¤a¥ ^#¦¨§C©l^aª§C©J«pj¯²°
±³Rf¬C­pisNgL®tnh X¤C·]´>¯ W }»º¼Z½p¾
.CZ¡hyµl¶Lis ¯pÄ ^nvpw|x¡ z.¸ xc¹l«
R.¿ lS p¿ 6RfÎ»SJILÀQ iÁaÏ¡scÐÂCÃd¡nsz È ¾ R  nZs fdW6ÑZ\AÒZÅCiÆs ÇpÈ ¾ R»[»É Õ²ZÖZÊCdnË nÈ s ¾ h|Ì h  Ásj×NÍ Ø  W
Ó²Ô ÊX¡Ë sc^Y ^AY¡ßQàX¯ xZá»â ß {|ãQä dyhÙÚijsp
ÛÞÜÝ¦ªåæ U  s»ç  dp^  W ÆéèÁu dfµl¶ëê  U  sLu»[ Xì  fí } ÅîW ZïðXñ C[fµL¶uý¡þL¤C¥ÿ >ñ Jð]îòQópJdL¢ôXõt¤CIc¥önJRa¾É  WJ÷JønùcúZû ä ^JGJZ.Î»IJ|È ¾ d¡Qs»T oÞ  TVWXüu ^cÈu  cW   Ì  Qsc[ld ²d[ ãnä Ó.CpGÎcJIC}»aºÈ ¾  È æ sc
³ .CpGÎ»IC W } ^AYj![ "#l0ð PL/%h 1 $'2!&X3GUZ ²lLX¡hNµl¶ T 9 ~ (j â )* ±n ^Aj^  !g  +l~ i sLæ    o- ,   sa<]  .jO [ 0ð . /O 1=23 [²HJ=I > Ô 2!%[ 3 40T 5¡U 7[ ?6@L8  A0B : d ;Ej^ /C12!3 hNgÁsR 

1.

programhuman readable
machine-readable
machinecode

languagecompileprogramming language

assembler

C

FORTRAN, Pascal, BASICC Linux
UNIXOS

C++

operating system OSCCvi, emacs

source file

C.cexecutable

xyz.c

 EH DtIGFéh H isf6f[IJ²W HQ¤C¥K/01L23 [7405  ^²s 
> i23²O P h  HQ ¤C]MK¥ 4N/05²1%Rf2i3 spR» ¬J ­Z iÁdn's mpQ sc¯  R  [ [»gp²®A!u SHlTnIL> R H23 ]iÁ6HJs»ç%I >  2dp3 ^ ç  W6L H HLI ]R
cc xyz.c

cca.out

cc -o abc xyz.cabccclink i ² \  ¡HCI=[p> ö]2\3 ^ O_ P6- /]1%23 hV `aI] _./C1=Tj2!U 3HQR ¤Co¥K /0Wn1%2 3 haÛ ÄRaU0¬lVE­LRXiW s)R *  ±c³= YZcc -c xyz.cxyz.oobject fileabccc -o abc xyz.o1

_ iÁdsa/l1EuQ2!3T n[ECe]lJZcè C¦ [0z a»±²daÄ üCzb0Q c|üth $N&fU ]î ªÁ~ u  ·WXf6g] ho di×jØ `fÌCIòÞ_|iê ¡s ~~pÔ Ø  R  [![LöC\^}l~p TN^ a² ^AN^  library

cc -o abc xyz.c -lm

2.

cc -o abc xyz.o -lmjpn~ lo]ZC    ínH oZ[ k.
d7l+ ê   scm  ín[n 9  Ho R }l~Z &CU.\  í [nh R U6up\ nG[!; Å õ ÎXHlpI dcr¡iLrq¡ü.[!nAhrst0u
9wvix : d Z &JU Ä wCy R  h|g  Å´W Ô  h7n  S  R<z ]N :   dnm¡scLö.N{r_E| }.[9wx : r[ 8tR 9 : r~A ^  n.R  [r  Qs»
statement

11;

block;

 oÞj^²sLnÈCn! / aOn|c ü!n|c ü Y] Tn1

x = 3;
int x;
if(x 1) y = 2;
int func( a ) int a;func( 4 );v return( a ); x

 1. <n²[¡[]L Å Cðr O ð WCPöjW7 nH  $  Wp  Nh   í$&»U²u|oCl^  [CdCW o [.\t] RXGCLXph ·Cf Ó i C is ~¡Ø R7L ÌJipkGmXdp¡s»nHQI  9 /* : d, }Å 9 */: d!;0Gsf ð O ðZr¡ ê  s  !J¢ ^A  YR£  U.uL\  /* for loop */for(i=0; i<n; i++) {a[i] = b[i]; /*k++;/*}

3.

¤ ¥ IJP */*/¦¨§©

ª expression «¬]­ operator >Ô [XÛ¡ÜGz ¯  operand oÞ|^ &JU  sc®²^r¯ ÿC° h  2RNr T ~ ±²K³µ´¶N·¹¸]º¬Lü Ó fc üt [7465 hr»]¼ ­  identifier j }l]´~ 7½¾ ° R ¡ ê  s<nC¿ rÀ ü00¿ Å Æ Á 9 : dnÅîW<ÂÃCn¿ üC¡¿ d¡& U ^tj^  WfiLk¡UL[»¬CüQWcaü [ÄhaWÇ ¹Ck declaration statement }C~p |c ü  n¡d ÈÞê  ^ |² ^>^ Ô  7"LO²P%È.data
R 7type 3Rrpi\Á] ^7   ns»p^p£ W 1 É ±ÊW byte  8 ËÌ W bit Í7ÎÐÏÑÒCÓÔ<ÕÖ×ØÚÙÜÛ'Ý CPUÞ]ß'à-á0âã7ä ÎÝ SPARC ÖråæKÍ%çèé!Ñ Pentium êë×CØìÙîíKÍïðCñCòóêô ãä SPARC

4.

2ø<ùú
+ –õ<öû /%++ – –÷7øüý øþÿ øþ øþ  øþ ÷7ø
 –   "!#$1 %&('*),+.-0/ 1 12#43 þ 5 '*ú ),+.-0/ 1 6879#43
:; /=<(3>?@4 BACD1E6CF; /=<43"BAG(H úIJK G(øHþÿ øþ øþ  øþ ÷7ø þ G(H+R IMü ýQ<S LNú I û IMOPI % I I9I I :FT'ýVU þþT'ýE@þEWc4UXdr þEZYcfe ZYb`a[]\^! [ I \ I :_ UU
gh ú! iji &&kl þ gh m þg(h m n 2. oW ÷7øp  õ<öõ<öqFr s %t-vu
w4xychar
1z u yint
4{Ez u yshort
2| z u ylong4}4~ ` u" yfloat
 | }~ ` u" y double 48
n 3. 5f y  õ<ö ã Ö Þ4 Ï=ñ  big endiandÑ Pentium
Ý 4 ×CØÚÙ ÖÒCÞÓCÔ ¨Í Eã Nð0&ä  3 2 1 0 Örí Þ4*¨Ý  0 1 2 3 Öí littleendian FãÛã éê*ãr ä¦&§ ÕÑ  ÛÕÑD  ÛÕ]ÑB  ÛÕ Þ Ý* â Ï ÖE &¡ unsigned£ãrä"¶¤· =é ê¥Ñf¨*© arrayãÖ"ä ªÛ'Ý «¥¬NÍE¢­£%Ñ"®C¯!Û¨Í°±ñ"²¥³CÖ ß  Þ ´µ Í¢8è
Ö4¸*N¹ Ö ®C¯ Ý « 0]¬ ê]ôunsigned int pqr[10]; ÛÕÖ"º!ÛÝ4»¥¼Ñ 10 ½ ÛNêÎèéÑf¾¿é 0 ÖråæÝ 8 ½CÛÀ,ÁCÂÀÃBÄ ã ÖêÑ 076 Ý 10½Û'Ö 62ãÍÞ ÅbÆ è ãrÞ ä 16 ½ ÛCÎ*ãÇ ä"Þ Ì&Ï Í § ðÈ( Ý¾C¿ Þ 0x ÍE¢8£ ãä*¦C§ Ñ ã long êô ã bÍÉ ç]è â8Ò Ý"Ê&Ë L Í(¢ Þ £Ñ Î*ä Ï¥Ð  Û¤Ñ Õ'Öº ÛKÝ"Ð ÛbÑ Ö]ô Ð ÛCÎ¥NÇ êÎ Ï ÑßBÓÛ¤ÔÍÊ&Ë ¢ £ñë ð è ñÖÎ*ÏÐ Û¤ÑÕXº!ÛÝ double ]Ï=ñ­Õ
43.2e-5ãäÄ &â8Ò  Î èé!Ñ Ý"ß  â4ßà& ÝáÛãâ n Ûäd Îè äAÛÕ
Öº
'Û"
Ý*
Ö×Ø
N*êÙÚÜêÛÞÖ ÕÖ ¶C· Ý &·  â]ãä4· Ö"ºÛ'ÝEå×Øê*ÙÚ ê ”abcd” â­Ò  ÎGÏ Ñ C· Í(ªÛÖæ­!ç ê"èCéÈÃBê ãÞ ÝCë Ö"ÔCì Þí î*& Ûïâ 0 Û Íf°ð± ãrä3ñò0ó ô õ ÖöÞ í÷ ÝÎ 4 Ö4øù ú¥ûEÓ Þ0ßKà øùÀÃQÄ ãäüCýþÿâ   Í(ö0Þ Ñ â iëNÏ â ð ä]é
if( ) ;

if( ) 1; else 2;]éÌ  â   ã 1 Íö0Þ'Ñ Þ  â    2 Íãöä Þ äÈè ÌºÛ'Ö âè Þ<äswitch( ) Ò
case !
º Û 1:  1;Öº ÛM ë Ï ð  Ý ncase !
º Û 2: 2;..
.
default: n; â é ÞâNãf¦ ê  ÍöÞ Ñ â iëNÏ â ð äwhile( ) ;]é
¦ éö ÞÀÃBÄ ãrä CÞ òó ädo ; while( );ëÖÝwhile ¦ 1 ÍöÞ ä 2 é â    3 Í4ö ÞNÑ â iëNÏ â ð äfor( 1; 2; 3) ; Ì Ö î Ó  Í!­£ <" è ä
break;
switch, while, do, for Ö Ì#! Ö î Ó  Öf¾¿ Þ$ à ö¨
ãrä
Þ&Í
(%'
è
continue;
while, do, for Öä * â Ï%Ö(r) Û â KÍ¢ £ â ð äreturn ;)
<
Û


­£"!
ñ0Ö

*¨!
Í+
èî ;
 Þ è ãägoto ,.,&- î : éf¢ð § 
n 4. /.0213  w / w i 54 36Q'87 9!:UE3§ ±? else  Ö  2 é if  Í&@BA ßøÞù C ú<û Ó  Ý;Ä(< Þ è ã X
=é=>NêÑ?
Ñ¤²³CÖ ì²(D ÖfìE øù éCê¥ ãrä 1;
if( 1)
 2;else if( 2) 3;else if( 3)
 4;
else

5.

FHG
 û I,JCÝ K L function ÍfÖM]ÏLñNOÀÃDÄNñP à ÑQR <Ö¸( Þ  0é"¢ðñðCÖã 4 Ñ]ë Ö!QRß Þ û I,< Ý <) Û ã C Ï=ñ.ÕfÄ ãäfJ §Öâ ;TS%Ý main()ä ðMU)7Û Þ V ºãââÃBNÄ ñð Ö êÑNô­!W ß âû [ I(,J Ý<) Û ãä main() Í.X£(ÄY?  ð)rÛÖºZ Ý"²³]Ö ã` ÍKÏ ñð ëÞNÖß\]f ,^ÓÔ.Uã+ä è *'ÖÒCÓâ ÔEÕ¨Í ´ Þ µ Ï Ñ_)Ûé ÍEâ­Þ Ò  Í(ÓXº è ´ µ û_ãaä Cb ÍcedXñº Z è * Í!+tÃ ðå æ Ý void void ÕÍèpqr()

6.

double func(x, a, b)
double x;
inta, b;{int j;j = a + b;

4

return( j*x );}ÌÍ Ñ )EÛKÍgh_"Eè Þ Ý"Ö Þ func(x, a, b) èCÄY? ß d Ñ þ&ÿ <0Öij#,  dè ã ëêX ãä \],^ ÓÔÝºÛêë4 ¦ Õ â ð Þä C Ö()rÛÖ\],^ÓÔéâ ªä ÛNê°±.ã ÄÞ ñð §(ß Ñr)Þ ÛÖXç ê* é ªk Ï ñ'ëEÑ ghY"KÏl ëÖª kéÞ m_n ÃDÄ ð m_n Þ5Ãoê Ýf²¤³
ãÖ ãäC â ª Û'¶ÖC· 0'0 Í!\B, ^ ÓÔ Ï ñ°± & ë Ñ27) ÛÖ ºZ Íë Äó ñcð!p±P ÑÝ ß Þ Ó ç Ï â dEñë]q ÏC âãämain(){double y;func(&y, 1, 2);}
void func(x, a, b)
double *x;
inta, b;{*x = a + b;
return;}7.

¿G#rsFHGt ® â Û uY)<ÛKÝ4Ø&ÅÈÃQÄ0ñð ã éÑv¥Øè ã åæ Þ Ýë ÄÀ7Í ´ µ è ãf§ AÑ  ûI ,J2w
Þ#include <math.h>â d Ñ#z  \CØ î_{ Þ}|!~ i  s Í¢ £ â £EÄ? â  â ð äUcx&dby£êâ P Ñ<Ûu_)EÛÖ5* \B,^ÓÔÝ<è  ñ double ê°b±,Ä ã7ä"§ ±? sin(x) â &? x ëãräÒ Ö ß  â Ûu_)EÛéô ã  Ý /usr/include/math.h ÖçfÆ0Í
sin(x) ë double êôã EÕ ãrä #2  standard output Þ ª!ÛÖ!*Í!cb "'Ï §ià Ñ   2 standard input   ª!Û Þ * Í.
 Þ Ý²ß  Þ printf(), scanf() <) ÛKÍ(Ø ð ãä wQ¿Ö include  ÝD]ÖråæÀ%òód Ñb³ÖÄt5<) Û Í ´ µ è ã4§ A Þ ® êô ãrä

8.

#include <stdio.h>main(){
double y;scanf("%lf", &y);5

y = y + 1.;
printf("%lf\n", y);}&C· \, ^ÓÔÝc(KÍ%ÎÐÏÑ %d é  ÛCÕ0Ñ %f éÎ&Ï*ÐÛXÑÕNÑCê
printf, scanf Ö4¸*¹Ö l  ÍE¢.£ ñë"Ä "Ä long ô ã ð]Ý double ÍEÅ¥Æè ãä printf Öc Ö¸  Þ â n é]ô ã ÖêÑ7ê]Ý y Ö*¨Í " Ï § ]ÑCÝ"Þé4Þ.ÕfÄ ãä scanf()â )<Û Þâ ß'à âªÛ äy âé ªk Ï â £ÄH? âÞ  âð¥ = Ñ y Ý]ë î_Ö*{Þß EN â Í!\], ` ^ ÓÔ­C ÏLñ°.ã&± £ÄYâ ? ä  ðCP Ñ­Ä .)rÛ ðñCÝYz C\ ØR E, Ø ,B% Í(Óº è® Ý ðN s2]_ ; X,Î*Ï&ÐÛ¥ÑÖ!* Í5    Ñ*ëÖ*'Ö¡(¢KÍ£ ÿ Ï=ñ 2 " Þ c "<è  û I
ß<äâ PÑ  (¦¥ £ ÿ ¥ cY"'ÏLÝ§2¨ Þ.©µà +è ë7Ö Ï Ñ5ª,]J ÍrÑ onagaD0ÖC ê¤OCêÖ!'*¬_­é®  b¦ Ä § 4 Þ  ±û I(,§J éè« è ±.ãCµ ß  Þ ê ßräû I(,J(¯°ðÉ¢­£ 5²³}´ "¶·¸_¹&º

9.

6