|
函数大全(c开头)* H! [+ z7 Z$ g' ?0 j8 X
! J5 o) X1 d( p$ r8 M5 E函数名: cabs
' |. i+ I/ F5 h7 M1 t5 \' V. ~' g功 能: 计算复数的绝对值 : K% g2 m3 l, ^2 F9 I9 b
用 法: double cabs(struct complex z);
0 J, k7 X: V+ ^; ~程序例: 4 ?# x# h" d4 j3 K! E$ ~* Y5 C
#include
d' a# T B2 e4 @; l$ W) J#include
" k g R+ ~ l2 e/ tint main(void)
7 v: ^" u; [0 ^, i{
/ s7 ]+ U+ V( K9 qstruct complex z; . y. g8 C, d: z- d
double val; : U2 V' k( m; a; K
z.x = 2.0;
, F; k- d& {& E7 T) c. k+ D8 Oz.y = 1.0; 8 \3 Q; G0 o! o
val = cabs(z);
3 n! l/ [( C+ j) C9 e: eprintf("The absolute value of %.2lfi %.2lfj is %.2lf", z.x, z.y, val); # Q# {' C: U+ X2 c0 }# T* B
return 0;
( |& ~* z1 M1 z r1 ~/ ^}
" z% [2 w# e/ Q q$ A/ \
& l/ W4 G2 O% G: z
3 `# T% t2 m$ a! s: |4 ]5 K
- o1 L% [3 l; }4 u函数名: calloc . Q6 N! X% g4 I1 B, o
功 能: 分配主存储器 7 ], |' }4 P' |# C
用 法: void *calloc(size_t nelem, size_t elsize);
' {* V9 J S1 ?* H5 @ P x' @程序例: # i4 i0 \0 {9 w4 T2 o! J k4 Z( G
#include
) l5 t& H/ z6 T; r#include ! D% Z; Z" t: x2 y0 e( ~
int main(void) ! N4 v' T' t0 e2 g& t+ _" E
{ % z* {7 k E$ o3 G9 @
char *str = NULL; / B/ o. o A3 I8 |- V3 I l4 J% A2 R
/* allocate memory for string */
7 L; h1 t: W, a, j0 nstr = calloc(10, sizeof(char));
3 _1 X, G* E2 y7 i) Z# b; g/* copy "Hello" into string */
. {# Y8 v2 z) tstrcpy(str, "Hello");
1 d" Z/ d4 ]8 }% V/* display string */
/ c+ G3 s, v4 C0 fprintf("String is %s\n", str);
" w7 z0 d/ A$ @( Z& o$ j( O5 S/ J/* free memory */
2 F9 C' g% l7 N% {' l3 k+ `4 Hfree(str); ( N L8 s/ _3 o, T
return 0;
2 M9 {8 m! I2 S8 O" r}
1 [' L) K1 y* h' D/ m
1 m) u' T6 `# N9 @" n# U" O" X) [/ K# c: {9 U; d, V' |
# m7 i. {4 c1 z- ^* c+ u. ]; U
函数名: ceil 9 I* S* H7 B6 p$ W
功 能: 向上舍入
* k: [' N# E# {( ?- |. ]& ]! ~用 法: double ceil(double x); - w7 g5 i T( B7 ]5 d- j
程序例:
6 D$ l2 V2 m7 u$ `& j#include
* ~- M: S. ~8 U, H#include ' X2 e8 V8 N# Q$ I
int main(void)
5 H, H/ ]! _/ r" D: x/ {; j$ T{ 7 M# Z. c4 Q5 p* H- [& H
double number = 123.54;
' |, M" h i# l* K, H2 D. F6 }double down, up; 0 w4 h# m" L' K @$ x: w w: `
down = floor(number); + o% J( P" I' ^( _2 ~0 k% ?
up = ceil(number); 5 P8 S2 B: K9 O g! ]9 V' ^
printf("original number %5.2lf\n", number); 8 {6 S. ~; V1 m1 F: _6 x; @+ P
printf("number rounded down %5.2lf\n", down);
/ q& E, P5 I% D6 Pprintf("number rounded up %5.2lf\n", up);
- s) V" `, g- ?# {4 ireturn 0; . E& H( g9 q' T- R. f
}
. p1 ]5 R" y( N, l
1 e5 q0 t. O1 M- M. ^% T% Q( a
" _0 \! ?2 A5 W) l2 J' H x# u
) m: u, K0 n7 F( D6 i8 Y5 F* M函数名: cgets 5 v# x4 Q- |5 Z, u- V5 @) l
功 能: 从控制台读字符串 , M) a& n. E) j8 R0 R" |: o
用 法: char *cgets(char *str);
8 w, p6 @( c1 G9 S0 `程序例:
; A! T) [. ~" A( B- }9 d#include
2 s5 h8 k% j1 [% d4 K#include - b* c7 a$ I6 }( T9 P6 M
int main(void)
. G$ p+ @. M! k5 g2 F{ 7 e; Q h8 t2 O0 |1 y9 y$ V
char buffer[83]; ' j+ d# b$ X# @4 P$ A! p5 o
char *p;
& Y9 k/ Q9 X2 b9 ^8 g- N9 E. p/* There's space for 80 characters plus the NULL terminator */ # ^" i9 }# e' A4 F
buffer[0] = 81; " `' w1 V! A$ D* Z
printf("Input some chars:"); 8 i6 h0 P' v3 m) _8 X# e# ~, f' Y
p = cgets(buffer);
5 |, p# K* t3 Y; Y( iprintf("\ncgets read %d characters: \"%s\"\n", buffer[1], p); ; t' s2 ^. w5 d0 z. R
printf("The returned pointer is %p, buffer[0] is at %p\n", p, &buffer); , l0 u5 P. N- X5 x
/* Leave room for 5 characters plus the NULL terminator */
- d, c) _! ?+ K+ hbuffer[0] = 6;
9 w3 H$ l+ n, r( Z2 {/ Iprintf("Input some chars:");
- g8 c [7 \+ u" F7 u% kp = cgets(buffer);
' |6 y8 ?* P# `printf("\ncgets read %d characters: \"%s\"\n", buffer[1], p); - C% J) u2 G9 F' Y G: n" E. Y' U
printf("The returned pointer is %p, buffer[0] is at %p\n", p, &buffer); : d5 e; J2 }" j# ?+ W
return 0; 8 Y! P' [/ Z B: }; A7 `1 ]5 c
} 3 n" p( r. l; e7 g6 t& Z
: K+ r& Y' D& s* |3 y3 Q; o! P/ f8 E, u, C6 I( j! ? i
% O9 W5 I( i" c/ V0 H% g函数名: chdir
j- K L! E- O8 M2 l: o/ R, G5 X功 能: 改变工作目录
, h2 L% P& t. W' q0 z& w用 法: int chdir(const char *path); / q- z0 u3 t j9 R! h
程序例: $ B( I. a# Q7 ?1 {/ h4 z
#include
( G7 I- \0 e" S2 Y. R& E* W9 X! R0 m- f#include + w) p( V% ?9 w& F( _8 n" H
#include 0 g9 o1 n2 ]0 Y2 W
char old_dir[MAXDIR];
* b( L+ D# d$ ]: d' Y4 Mchar new_dir[MAXDIR];
0 z( t) R: M& ?: mint main(void) 5 y1 ^( P) G& S( Y( ^
{
# g+ M( |0 F3 l5 q* g% H, _, j _) xif (getcurdir(0, old_dir))
- A0 a6 X9 B: f( m{
+ C6 l2 n, ^3 O8 n' d! Jperror("getcurdir()");
& ~- ~ {2 o$ ^$ v. U. I ]6 Pexit(1);
$ b4 e, z$ C3 Q1 l/ M p7 C}
! ]5 f+ I/ @! ]2 }. cprintf("Current directory is: \\%s\n", old_dir);
5 W, l. O8 y8 ~0 Xif (chdir("\\"))
& s% o. e7 j! { c7 o# _{ # N6 n' d q- M& A- I
perror("chdir()"); 7 |6 O, l5 X3 `9 l0 f; v m$ g
exit(1);
u$ U) P8 Y1 N% B. J" y+ L4 f- a" s}
9 t% \) i! j" w9 a* b) K" S, c# Y* Fif (getcurdir(0, new_dir))
]; [ c$ n, O# T) _) o" x, }{ k. T+ k( G) l( b
perror("getcurdir()");
3 @& Z4 `! H2 P7 Kexit(1);
; x: k! x7 N2 s; C' ^0 {: q* @} # R- D2 s- [# C; C* {$ n
printf("Current directory is now: \\%s\n", new_dir); ' ^$ {, Z0 V$ |$ t# T
printf("\nChanging back to orignal directory: \\%s\n", old_dir);
: f1 u5 a: y' }4 S, q0 s6 tif (chdir(old_dir)) 6 T. d! `3 V, o/ Y# i: i/ ?* d8 ]
{ & e# M/ B( E; C- A4 M) e0 k
perror("chdir()"); & {/ L8 |4 Z1 L
exit(1);
5 K {7 p8 [1 z9 a( f} : X3 i Y, F& t
return 0;
0 X& B& X6 ?* k" N, {}
/ e' k1 p5 R8 w- h
5 b3 T' K1 S5 ^4 n a3 a 8 F; }3 {( [' K0 H
函数名: _chmod, chmod
/ ^- x# I1 {$ _9 a4 `) B! f7 M" j- A功 能: 改变文件的访问方式
7 L' P, |2 E# U0 s" r8 X3 F用 法: int chmod(const char *filename, int permiss);
3 G: q9 Y+ | Y4 P4 u* F& ?程序例: . C( A! m& {) r
#include 1 \% D6 ?- I: U- A9 b
#include
( P6 ?2 c; F# z# N$ j#include $ A- U M4 T2 e
void make_read_only(char *filename); ; T; i' v( v8 h/ x' i
int main(void)
0 U6 j* p" p+ y( m( H' ?2 H8 a{
' W9 Y. `, T+ l1 y" t# u- Jmake_read_only("NOTEXIST.FIL");
9 @2 E: K& O$ Z5 ?make_read_only("MYFILE.FIL"); ) s7 z% f. R3 t* \
return 0;
( ^/ {9 I. U9 h" {) {& z} : y$ ]7 [, s) \' E" y
void make_read_only(char *filename) ( U. i9 i3 L- C" L: `0 E2 T. u
{
5 a7 c; e9 q, L8 x8 G( @0 zint stat;
3 L( p/ `2 m! y c/ z- m0 x- Pstat = chmod(filename, S_IREAD); * h8 z1 q3 S9 e* Q* }& `; F j( k9 y
if (stat)
7 _: e7 W, p1 n' W6 |printf("Couldn't make %s read-only\n", filename);
! V/ H7 q0 }: x/ F* e" Ielse : g$ o: q9 ~+ V" g. m2 ~- s+ @
printf("Made %s read-only\n", filename); 9 @8 C7 \1 |* m' x/ w7 P, j1 z% q
} , p7 b8 o* [- M0 l* S1 v5 G
$ d k9 K8 A* O: D$ C7 `
! l: |7 @4 C. P1 B! G0 P
. N( B( o/ ]/ c0 ?1 e1 O函数名: chsize
* g2 Q, q3 _9 m$ {& Z+ z8 j& y8 ]功 能: 改变文件大小
& k- ?1 ?5 U$ _# u, K E% K用 法: int chsize(int handle, long size);
3 w/ T6 ]4 f J1 ~% \( W程序例: ( n1 ^* P: I+ D) u$ c* E
#include ) w% w1 s& V, c; e) G
#include
1 I4 M( @5 z1 ~#include " n0 {5 S; R. @+ I. G$ Q
int main(void)
! R9 {; U* H K4 m( L$ N v8 R{ Z) H+ x& I% N, y$ y' S
int handle;
, W$ o: `) j; Y3 ~" xchar buf[11] = "0123456789"; % j( w3 V1 @& i) `5 ~3 [) @7 q; r4 s3 n# [
/* create text file containing 10 bytes */
4 P; e, Y0 I% J: Y% ?handle = open("DUMMY.FIL", O_CREAT);
& v' s; g* n" ~: p& zwrite(handle, buf, strlen(buf));
! P. U/ H! h2 K/* truncate the file to 5 bytes in size */
1 {2 b9 r1 l3 i* P* d. R0 Fchsize(handle, 5);
4 ~! x& `4 m8 G: j/* close the file */ 7 i6 c) O* M9 v m
close(handle); 5 C8 j, `) C Y3 H
return 0; $ X4 s6 d& ]& c6 T7 ]5 v# D
} ' k9 X9 \$ {: V5 B/ L& w
2 t0 P h5 L& e( p) n. P
; {' n" {' [9 u3 \' n2 Y' `) [函数名: circle & I4 g+ W2 |; z5 K P- E
功 能: 在给定半径以(x, y)为圆心画圆
: O& [8 v e1 @用 法: void far circle(int x, int y, int radius);
0 ~' [' B6 P0 a' S/ P9 c& t0 V7 k程序例: " |+ E6 Q% T2 j% K7 K
#include
- w7 a% j1 G% v3 I1 o w4 @8 z#include
/ l% m: Q3 ~% x#include
- N7 s: S+ Z6 A7 `5 P5 H* _, n#include
% [" W' {: L" bint main(void) e5 q/ n% L/ s% J! P+ @1 G
{ . G+ U/ K; A4 V6 Q# R2 U
/* request auto detection */ 3 D& H; O& I8 g+ q& Q- T: l8 G
int gdriver = DETECT, gmode, errorcode; - s1 Q _1 E2 R" r! ^
int midx, midy;
7 Z! i' j5 b. Z9 E) a( Lint radius = 100;
; D) F0 \3 k* o/* initialize graphics and local variables */ 0 v9 q |2 K' _7 m' }( f
initgraph(&gdriver, &gmode, "");
$ k2 }3 D1 {' s' ]2 |3 p/* read result of initialization */
' |9 ~+ v5 [0 y1 P4 r& e6 _errorcode = graphresult();
8 \" x/ W4 B8 L2 p& P- J U! cif (errorcode != grOk) /* an error occurred */ 7 y9 p, q5 y9 n( G m9 X3 u: W* @( p
{ ( A$ c- b/ W* n$ K. f8 k
printf("Graphics error: %s\n", grapherrormsg(errorcode));
+ E1 y6 i) }( j- X! [2 P( Fprintf("Press any key to halt:"); - L4 g) |: \* s" s h
getch(); " a) }1 j6 Y" d% N% j
exit(1); /* terminate with an error code */
W; \8 b1 a3 |} . e6 Y" \4 b; d1 C& G. ~- g
midx = getmaxx() / 2;
+ S. B& k" P' T- `# v4 t7 mmidy = getmaxy() / 2; 9 R" O: H3 l* u4 X& t
setcolor(getmaxcolor()); * l2 V9 u- N- a; z4 I
/* draw the circle */
9 B; e3 ^4 K) G5 O/ C: O0 \circle(midx, midy, radius); 2 \, T# k3 \) S4 e$ K
/* clean up */
, J! A5 q# ?) {9 t$ v5 _- Fgetch(); " I/ q2 a, G( U1 F
closegraph(); 5 [& H4 G& w6 k3 R& g) ^ v
return 0; 6 p( s# H! F6 L& D0 p( m/ R
} : f$ d. q3 K0 B% W( r
4 _5 h* b$ ]- d; v6 B
* y6 l0 R+ {/ r: y5 n1 s( x 1 ]5 F: h/ p- p8 S( L( L) M' g. L7 L
函数名: cleardevice ( Z2 \7 h8 X9 c
功 能: 清除图形屏幕
J; i r8 D9 K8 O# [9 P4 o用 法: void far cleardevice(void);
( P7 l* S7 A# |程序例: 2 d* c2 u: f5 f
#include 7 z# k/ H0 ~9 `6 W2 ]+ B
#include
5 G4 V/ }8 F8 W. D5 @8 f#include ( n4 Z! g4 Z( Q! m' Z9 b/ k5 b
#include 6 H% g9 a9 k0 B
int main(void) 7 L/ Y( r8 w$ T; i* A+ |
{
; N" w* q B+ V/* request auto detection */ 3 D: K, B; F- x7 y% s
int gdriver = DETECT, gmode, errorcode;
6 ?( ^8 B+ r3 X; _' B+ L y9 D9 cint midx, midy;
0 ^) ?8 E# Q" U% Q9 U+ V7 o/* initialize graphics and local variables */
t# L j7 ^/ t% x( Z4 ~0 O% b* P6 C( finitgraph(&gdriver, &gmode, ""); : f# z3 }# ]5 b& Y# _/ P7 u4 ~
/* read result of initialization */
6 W" E# N+ v% k& H4 a5 l; Derrorcode = graphresult(); ; u. F! @: Y$ ? A/ \
if (errorcode != grOk) /* an error occurred */ " T" P2 r! x4 r8 X$ U3 E
{ # @3 b0 o; g. {
printf("Graphics error: %s\n", grapherrormsg(errorcode)); w( [* ^7 d8 m n
printf("Press any key to halt:"); e9 Y1 o( f' Q6 M4 O' o
getch(); : }9 c/ X4 x7 u) T/ o: }: p
exit(1); /* terminate with an error code */ & r ]8 o" [4 Z! Z; O; V
}
( }# t4 k* T+ u! b7 q; jmidx = getmaxx() / 2; $ Y& p# V# Y: I
midy = getmaxy() / 2;
8 Q$ j- Z4 J! K6 Asetcolor(getmaxcolor());
2 N3 I5 d9 c* M0 }* ?+ c8 G; j& N/* for centering screen messages */ * r, B" P# g' k; H9 ^
settextjustify(CENTER_TEXT, CENTER_TEXT); 3 i( Y8 e6 c" ?
/* output a message to the screen */ * k& x; \) Y5 K0 S# B: Q
outtextxy(midx, midy, "press any key to clear the screen:"); 0 V) \% R' \/ J
/* wait for a key */
& |% @* B' s4 V$ r* O# e( Z) Z8 \getch();
$ Q) z+ ]: F Q6 Z- Z' X! \9 W/* clear the screen */ 9 Q4 m+ D) x% B1 \$ Y3 [8 \
cleardevice();
5 w4 C# k. L3 y/ J7 ^" H. D/* output another message */ ! e7 f' ?, C6 n+ b5 w) A0 c
outtextxy(midx, midy, "press any key to quit:");
9 m0 R% v% v: a3 I/* clean up */ 7 x) G( p8 L0 [: e6 V1 q
getch(); ) o9 `5 |9 a! Q% h
closegraph();
8 G# u/ n# @; J6 ^7 x1 f$ @return 0; . J5 I6 E3 N' O; _, o! O
} 3 {0 l6 }7 u& h4 z
/ v* u$ s1 y7 n1 |! t9 M; z/ N; v" L
. x) c" N! a- M& t3 Q/ z
函数名: clearerr
- ?. Y" Q5 ~% R' F% O4 L$ s' c功 能: 复位错误标志
9 d3 f* q% z( D% a( i3 W" `3 F用 法:void clearerr(FILE *stream);
( d& G, c* |1 B# V7 C( |程序例: 8 Z X$ _- k3 ]- h5 ]* ]; a, f2 Y
#include
9 ~1 k- ~7 J' c. tint main(void) 6 t0 F: d- O5 |; T
{ L- S' D3 t: B" i% s* r! j
FILE *fp;
# A/ \9 r; N3 |; z: \0 C+ uchar ch; , W# K4 j9 _# K! }5 c' N- c
/* open a file for writing */ $ K$ P; ?: d4 Z/ I7 S/ i/ d
fp = fopen("DUMMY.FIL", "w");
9 ~ H' P# y; o2 y/* force an error condition by attempting to read */ " c) t4 m2 Y, @$ a$ U: x! g/ ]
ch = fgetc(fp);
; E2 Y4 f$ F& K0 sprintf("%c\n",ch); # N+ Z0 \- z0 {
if (ferror(fp))
5 V0 q! d3 n+ h9 U& o+ q{ ; @& \7 S- ]" v% k
/* display an error message */ 0 C' L5 b* |7 @9 A
printf("Error reading from DUMMY.FIL\n");
0 ^) [& z! P! q/ ~# F0 _' ^/* reset the error and EOF indicators */
& P- k( I9 y1 Kclearerr(fp); 5 H1 U+ t P L* P( A: X V; O
} 7 `) C n( H7 S1 r& Y
fclose(fp); + m8 y: C" F) ]5 D) h
return 0; $ J% ]" B+ n4 p+ |1 z, m6 c
}
7 t. y9 g* U1 f4 G
5 x: z0 K* ?5 J* g4 `" w
$ t, Y% {% F+ p. [- Y
$ I6 a9 X) ~ r; E4 t函数名: clearviewport
5 j4 n) ]2 m4 y6 M4 c功 能: 清除图形视区 ) C0 \- n) j: I8 R1 w
用 法: void far clearviewport(void); 0 [" k" F, i( }4 c
程序例: 6 s2 h' `4 \0 I- q
#include * P! D/ i# P. j& x: u) Q
#include ) V3 q# ~) k y) b6 ^# w$ b
#include $ {0 L- ] A: Q: `, |! ~
#include & S" g' g. f4 b- |) H
#define CLIP_ON 1 /* activates clipping in viewport */
2 R6 x- i- A* k" K8 f* D7 b2 Dint main(void)
( Q2 t ] I/ ~+ Z+ L7 K- o# l4 e{
8 C' V- M3 b0 [ F6 q( d& v/* request auto detection */
. z, k; V6 z, f* t- Eint gdriver = DETECT, gmode, errorcode;
/ J6 U! V8 v1 C) G; G6 {4 J" Aint ht;
2 |. ^8 R" l9 f8 V. {) c/* initialize graphics and local variables */
" E/ j+ x! x8 X2 j, l+ _3 q! k# ~initgraph(&gdriver, &gmode, "");
' P2 n3 q* @5 c. C7 S0 e/* read result of initialization */ $ F% _* @' Q. A, l2 P* u
errorcode = graphresult();
6 K4 X+ F0 N2 E1 B& Q' p- r1 lif (errorcode != grOk) /* an error occurred */ % S' s% T, K \7 w4 [2 Z
{
% ?6 w' ~4 K7 P. Z: r5 bprintf("Graphics error: %s\n", grapherrormsg(errorcode));
0 ^# o7 Z+ C% h& d& D) nprintf("Press any key to halt:");
1 k, O1 {% l+ ]5 M$ Pgetch();
4 B" r9 m, Z$ I# C. N3 j- ^exit(1); /* terminate with an error code */
0 H6 ?: h" D1 u. l3 i+ g8 _$ D. f# E}
8 _1 b/ c% H; a* x5 bsetcolor(getmaxcolor()); : T. k4 Y( n6 n
ht = textheight("W"); 2 ^1 K% P. L% p" `7 l
/* message in default full-screen viewport */ $ u+ n, ?- E( }# b" i) B$ h
outtextxy(0, 0, "* <-- (0, 0) in default viewport");
V Y5 b- m) m; q6 r/* create a smaller viewport */
$ p- z" M7 n4 R0 W1 |setviewport(50, 50, getmaxx()-50, getmaxy()-50, CLIP_ON); & V* b& w4 B7 [+ F/ p( {* \
/* display some messages */
. F O3 P/ A; g5 z! Nouttextxy(0, 0, "* <-- (0, 0) in smaller viewport");
6 k- P5 t8 H- Z2 M* O/ souttextxy(0, 2*ht, "Press any key to clear viewport:");
; F. k' l' ~9 F" Q/* wait for a key */
. I/ f4 j% o( p* G; }/ Egetch(); - @$ Z0 z4 e# A2 p: M5 \( R( I9 q7 c: r
/* clear the viewport */
+ N/ Q | W* \4 |4 Sclearviewport();
/ G2 b5 w o8 T. \. j4 `/* output another message */ # o) U6 X' w5 E
outtextxy(0, 0, "Press any key to quit:"); 5 T; V1 A1 d- x+ `) T
/* clean up */
) s& }: {& ~9 U4 i' U6 t. X* Hgetch(); s9 H5 c& [" ]
closegraph(); " e: z; D B5 @
return 0; 0 D7 ~, a# `6 b" {. a1 h
} , F( y) V+ A' u {! e4 o
) t; \& j5 `. p1 V; _% B# `; E6 q
) K2 o; B( Y' e8 f7 N1 p/ q " U# }1 }. W6 ~" i7 z( L
函数名: _close, close & k: g6 S9 X! D; z" f' k( G
功 能: 关闭文件句柄 " d/ z; H& \, o; T$ S- S
用 法: int close(int handle); ! D4 W8 s( P8 ?# X& C
程序例: : C- q1 [1 T4 D! y. \1 A) V: u
#include
{3 |6 k, G5 K/ `9 K! a. r#include
5 Q' S8 n7 c, o3 i" y#include 9 L% P# E; Q; z5 o9 J
#include
! c. X$ E' D: v2 t4 e( |4 t- Rmain()
7 H; _( v1 B4 ~5 J4 E5 t{
) Q2 V2 d$ Z9 D! eint handle;
! ^: d* {9 R# f. y9 C8 Hchar buf[11] = "0123456789";
0 ~ X1 q/ i2 t" r4 X/* create a file containing 10 bytes */ ( i; [7 Z5 z. j8 z {* C
handle = open("NEW.FIL", O_CREAT); F3 I: W* Y* W) D2 x
if (handle > -1)
8 A9 A" I% B, a* y. W) _: r" m{
9 F. g8 f2 _- o' W5 ?write(handle, buf, strlen(buf));
% A* N |5 d! |/* close the file */
" u& s" y4 O, x+ |close(handle);
! ?* n- X1 Z7 {0 R6 F} - {$ z! x( j: K( e3 O
else
* ~. _2 f; D: C{
$ i. m8 ^' n8 j& S6 A7 kprintf("Error opening file\n");
( ]4 T& W2 ]& C, v5 M1 p% o& ]} # y9 E$ Y) y0 G" I0 ?4 H/ F6 Y
return 0; . @% M* E4 H5 u2 Y7 S& \- z
} 2 p' T$ K$ W- ?
. K5 Z" m2 w' ?5 O* H6 C4 l9 {- G
5 Y; `; _5 V5 [ G 4 ]+ g. `$ D* n2 a/ Q
函数名: clock & ?" ]5 y; d4 U6 G
功 能: 确定处理器时间
2 X& e1 X! Q" N& P用 法: clock_t clock(void);
2 O. i" \3 h+ y. v程序例:
% Z4 [3 p5 W; p8 Z- O* M. q#include
4 v3 j& W7 { ~& y9 d8 I' ]* k#include
7 _ }4 A6 s6 V9 u" ~#include : K+ A( L1 F9 t" j2 P( f% K
int main(void)
. u! G- d* o$ r) O A{
8 ] y# c7 \ t# p' v/ Cclock_t start, end;
R2 u7 L+ D7 h! Z+ |: |+ F5 `start = clock(); # l! @$ c1 c& ]9 G
delay(2000); / _' s& a4 G3 k: H( U- d
end = clock();
& N* g" \4 A% l9 J( s& Aprintf("The time was: %f\n", (end - start) / CLK_TCK); $ X9 J, c5 Z5 R" e9 T2 e( Q1 h
return 0; ) R' f- ^4 S8 l3 y
}
. t; Z( n5 B+ B9 \& A# Z7 K1 j
/ w/ A- N# H- {' J) l
! ? S$ i' U4 q- g6 x: j2 r7 P
- _6 Y0 j4 K( L) a1 j7 c) R函数名: closegraph ) U/ q$ O' w* \& Y* Q
功 能: 关闭图形系统 ' m% R$ n% X& v
用 法: void far closegraph(void); 6 {/ X% V) Q5 F# l8 w, T
程序例: * c3 [9 E0 |; E$ b
#include
+ Q' A. t' G# Y/ n9 E; S/ N9 x#include
+ O* W9 B+ L4 y; D% @#include
) ?* p ~8 a, N#include
4 Y' d, A0 T/ c& e- ^' z# F. b/ Pint main(void)
8 ]- c+ |& W5 e6 q0 t# a{ 8 j, }6 s8 E2 G' g7 B
/* request auto detection */
* L/ |, a9 Z% x- F1 ? W' e! oint gdriver = DETECT, gmode, errorcode; & N; h% h$ F b1 v
int x, y;
& }( N* G' F9 F h. U( N/* initialize graphics mode */
1 Q0 F# r1 Y' j4 I. u xinitgraph(&gdriver, &gmode, ""); / s5 A5 B) d6 K; E; I3 H1 d
/* read result of initialization */
6 w; W6 w$ u6 werrorcode = graphresult(); 9 Y8 @0 l' c5 C# x* X N3 l
if (errorcode != grOk) /* an error
! i' M/ G' B7 G4 T: ^$ ~2 V0 Koccurred */
7 v6 \3 S# }) J{
1 M" J5 j W! d, C8 }" [printf("Graphics error: %s\n", grapherrormsg(errorcode)); 1 p5 I2 U6 q. b" Y; n
printf("Press any key to halt:");
- g5 G; Y/ F( I. ~4 N9 Lgetch();
6 P. r H" @7 J6 F8 Q7 Lexit(1); /* terminate with an error code */
& Y7 G+ o" b+ W& J, T' F}
% X. l( _; k/ Zx = getmaxx() / 2; * H6 P4 [/ h- t# t2 n# @! ]. p" B
y = getmaxy() / 2;
7 B4 k* f% L/ b& U5 m/* output a message */
" L; j1 i% U, n U4 Nsettextjustify(CENTER_TEXT, CENTER_TEXT);
( j/ a) Z8 i+ n9 W1 G* A/ j6 Pouttextxy(x, y, "Press a key to close the graphics system:");
7 V% j8 z% _4 m/* wait for a key */ ; ^8 d$ j+ t. j6 Y' H9 Q
getch(); ' C# F, x! r: f& ?, j! L5 R
/* closes down the graphics system */ # a+ u% U+ A3 f5 N; X
closegraph();
! J$ \) Q9 N% ^! I3 vprintf("We're now back in text mode.\n"); - P" }# {$ z7 P, x8 i) D4 Y4 S6 k
printf("Press any key to halt:");
) r! W5 i' Z' b0 B% k jgetch(); : w) k/ m/ j' m7 O
return 0; " B- v% E, d! r% e: J1 g
}
g% v E I& K0 m5 I T8 y% T% q! b7 U; I& z* ?- N0 a
$ s, H+ I/ O% N* M3 d) J ! [! \% F c$ Z
函数名: clreol 9 c5 J: V! m* n
功 能: 在文本窗口中清除字符到行末 1 n/ ~" [2 B# D8 [ r3 B' Z* o
用 法: void clreol(void); A# P$ i$ J4 U5 J, ^* D6 x0 J5 K
程序例: " N8 M3 M: t6 |4 Q8 U+ B- P
#include
, S1 i; G" W" v3 n+ ^6 `) oint main(void) 7 V' r1 M- z' @+ Z1 h1 m' g
{ 1 s0 k: h( O9 C( R. M
clrscr();
5 R( N5 q. N& ]cprintf("The function CLREOL clears all characters from the\r\n"); ' r- ?" l5 v9 z( \# |, t
cprintf("cursor position to the end of the line within the\r\n"); ! {1 P% Y0 p/ V! p# \# R: C
cprintf("current text window, without moving the cursor.\r\n");
& H+ g; T5 i/ n/ e( M Jcprintf("Press any key to continue . . ."); & A1 a7 C+ n4 {/ `# B4 l5 R
gotoxy(14, 4); 4 \ K2 {) J% {% F- P; L) R
getch(); 7 S& x8 [ q ~- x! z8 F; |$ e7 Q
clreol(); 5 k6 {0 Z1 q" R' _+ q+ M9 O3 V# k2 G
getch(); ( B$ } A9 `1 \5 O+ V& B E
return 0;
4 k4 B7 G+ b, X2 p' v; Z6 T}
. k" O# r2 l3 \/ g- |' e/ R
. U' O* q, O, K8 b1 s& a, f: r* `+ x+ l
& e4 S5 f8 K% A: s. D
函数名: clrscr
* L7 n: h$ m) a3 u$ p$ w5 R功 能: 清除文本模式窗口
% ^6 h2 ?- a5 Q8 k8 a用 法: void clrscr(void);
, i6 D& L* a6 L% i \; { y程序例:
% t- F1 t* K4 M: W& Z& m6 v$ B2 n#include 4 a m0 O' o2 w# ?4 K
int main(void)
4 U* G8 l* w9 a- o) D% C% X8 m/ B{
8 }: ^5 l# S. F5 W4 [int i;
# P6 e: g+ p7 [clrscr();
7 C9 G& b4 B! m& b& sfor (i = 0; i < 20; i++)
1 \2 P, [% j- J; l9 a2 S9 H gcprintf("%d\r\n", i);
* H' M. o$ d0 kcprintf("\r\nPress any key to clear screen");
" ~" m( y' F' ?4 g+ z* P1 I% wgetch();
6 g3 N0 J z' |/ i6 H6 ?clrscr(); . e2 u$ z: F5 ^
cprintf("The screen has been cleared!"); $ j3 @( k% H: e7 ^4 Y0 `+ E
getch(); ' ?6 g* b9 j% `
return 0; " E8 H- O% n* d% p+ \# W, R
}
& S; [0 d1 g7 b/ Z3 w' I: F {% y! F" l" _$ q$ L& I9 b w8 h
5 {( B3 D; V6 C0 r7 e4 y) s
6 U' Y' s4 X# \$ r5 n% ]0 x函数名: coreleft
: y2 ^* Y+ L' p4 p2 U功 能: 返回未使用内存的大小
6 g$ J5 R: N! q \1 h用 法: unsigned coreleft(void); 1 J: s: Q: F5 X, ?3 R
程序例:
7 w5 R* m* P, }3 ]#include
, a+ g: V% ]: J3 j#include ' p/ C; t( ~" m; ~# {
int main(void) 2 m$ R) N$ W( d2 m# b
{ 5 e. v. E6 M1 B' |" X; A+ O X
printf("The difference between the highest allocated block and\n"); 4 o) _3 q1 }3 v h6 l5 g+ ^
printf("the top of the heap is: %lu bytes\n", (unsigned long) coreleft());
$ C4 ~$ l" G7 I: R( M9 l1 ereturn 0; ! e9 ], m# `& {# F' _% B
}
n# C' C1 V6 m
4 C9 t e) b( ~1 w! D函数名: cos
7 z4 w2 D& F+ W9 {; N- N6 o功 能: 余弦函数 + S2 W& d' m) P. I
用 法: double cos(double x);
& G# ~$ Y1 p A1 ~: w- Y程序例: 8 @; ]" v; @ {+ T5 V3 q' L
#include
; q; e3 E; H+ r& E2 }' `1 R7 C#include
5 J! S; z$ i; c3 e: I4 K! Wint main(void) + p2 {' @, n7 }0 j
{ " L+ G: U* p; D; Z& T! v
double result; # G5 r! N' g5 F6 c' x# E
double x = 0.5;
- I7 f Y* m2 xresult = cos(x);
2 m: F" T2 V, r0 Q# ^$ rprintf("The cosine of %lf is %lf\n", x, result); ( p- C* u0 Q4 q2 |
return 0; # d) @1 I) S( M2 o. q1 ?
} ) T) B! ] F4 }) y+ Q2 l# g
* T/ z. @+ C" ?* X3 ^' |7 J6 g3 c: ~6 o+ s; j7 c; R
5 B; B. s6 ]1 {; F" U F函数名: cosh
9 d% M$ g0 s: e+ v功 能: 双曲余弦函数
) M& }6 h& v$ B7 `( r! c用 法: dluble cosh(double x); 0 o& U. R+ i* D$ g8 u8 P) I
程序例:
5 s! |: }; J6 ~8 j/ _6 H#include
& M1 [8 y, y6 ?) d- y1 o4 N; {#include
' l6 Z2 t& p0 Y% d9 f) q* Cint main(void)
$ v6 K$ t, g/ f; o{ 6 Q" }7 W- M, J( T( r. t
double result;
+ ~6 r) V( r4 q0 O8 d- l) s/ j- z$ fdouble x = 0.5;
( z0 Y% Q g1 _% |6 L9 ^ _) }result = cosh(x);
8 J' e9 n* l, T/ D: t; J5 V+ Uprintf("The hyperboic cosine of %lf is %lf\n", x, result);
! {: y& |8 G6 @- t) g3 x, treturn 0; : F0 Q+ C" B' n, J) R, i0 i
}
$ \1 o3 k% w3 E- q) q* k, f& L7 m& {! F3 R
% T5 G y+ T1 ]' s$ {
+ A+ p* x+ g0 z3 \函数名: country
8 q/ y* ~8 G+ A: ]7 G; ~功 能: 返回与国家有关的信息 8 T6 g! o3 H5 R+ E2 d. ?
用 法: struct COUNTRY *country(int countrycode, struct country *country); % |/ `3 S3 G) ?; U1 F
程序例:
. y9 K+ Q9 M8 j! _8 W3 `/ H8 R#include
) t9 D* ^. S1 }' |+ x#include , J% ?+ j& W1 G& B6 C
#define USA 0 3 Q0 T6 B4 J! v8 k7 G
int main(void)
! m# k5 R( c8 E" c4 {; Y{
1 A! A8 o. i v9 k/ X: }$ X6 u+ Sstruct COUNTRY country_info; : p* L0 t) A0 o* U/ P3 [/ y, L
country(USA, &country_info);
5 ]9 O* L9 j) I- hprintf("The currency symbol for the USA is: %s\n", 8 Z- f1 ?( n! T/ r0 c
country_info.co_curr); ) ~& y3 k9 K, Y& N9 |( V7 M [
return 0; , K% J! y: @5 ^- u/ h
} 0 K+ `% ~' A$ A* W+ K2 ^) O3 `) N
4 H N" F2 C* x9 s: H: `$ P9 p, l; N
5 j" y3 g8 C, h0 B4 v/ _函数名: cprintf * w# h& f- K& h* |& T
功 能: 送格式化输出至屏幕 0 N" q" v* h4 {3 w% o# [; ~
用 法: int cprintf(const char *format[, argument, ...]);
" e4 w& E: @7 N% j% W7 S程序例:
8 z2 I6 L7 C4 d: ~" w#include S7 n, B: S* M, @. x1 `
int main(void) 3 m, u! L7 A- A( R- X$ h* ?; t
{ ; H: }2 s% s- l1 S/ U" v
/* clear the screen */
* f, I7 a: U: Aclrscr();
& y0 g( h/ W, D8 e( W+ O/* create a text window */ - Z9 b4 n- l* ]; B4 }' K
window(10, 10, 80, 25); ( s& O* `$ |) o4 d/ a
/* output some text in the window */ 7 t$ A1 b% q2 j7 m( Z. R' b& u, ]
cprintf("Hello world\r\n");
& x4 @* _& |/ R, P; @' e, v/* wait for a key */
) i9 X( L0 Q+ g0 ugetch();
% Q. R: ~; b' [) g: }5 o8 [ ]2 wreturn 0;
. t* `' r/ C. q5 _7 f m% V} ( D8 a9 g, r" W w+ o. I- n5 F
- i, _3 V4 P) l- x( @
9 y6 @ c* F) `* t8 b1 P9 j% h
3 ^& U1 k) z5 K! A9 `函数名: cputs ' Q, ~: e9 Y0 [5 [: |( p
功 能: 写字符到屏幕 . L) R, G% o3 z1 x
用 法: void cputs(const char *string); 6 x; P% a- _9 p/ J3 G
程序例: # ~! }$ r0 h4 W
#include
/ n+ F2 \5 }4 X# E1 Mint main(void) 6 r! E& ^( Z$ V$ G {
{ 2 B; Z O9 B1 O3 U4 L
/* clear the screen */
' k( x0 H6 E# v8 D% Yclrscr(); 8 D. M( t; t( ~* ]3 X d
/* create a text window */ # o( g+ u& h6 [6 q9 ~) D- N
window(10, 10, 80, 25);
, K+ T5 ^% w) K. m' G0 e" u# b: {/* output some text in the window */ % _/ v. a) f W; F$ V& t- \
cputs("This is within the window\r\n");
* P# n4 ^" ]# O/ o9 A- w/* wait for a key */ 4 Y" [* J6 \: ^7 w- i" z
getch();
8 @' c, u' c6 W D& Qreturn 0;
D3 N/ p5 R( r2 W* U% M}
3 D; |: a+ \$ k2 [$ o' E" A% G# q- c8 [! I: r& F: Y" V
, _3 m, k! z0 d# O, S1 \9 p# x! m: T7 n
+ t4 x& k) _* j; k
函数名: _creat creat
, p; D% M- h1 B1 W# L功 能: 创建一个新文件或重写一个已存在的文件
6 i1 r: n! V! }+ S6 c4 \& p用 法: int creat (const char *filename, int permiss); ) k6 N7 l( a+ z M/ z
程序例:
3 t! [- Z, D; Y9 _; i#include
% @& F* I0 K0 N#include
# B/ M, F" V0 Y1 C4 V#include
( A7 T D7 w0 P#include
7 C4 }) }" s0 P! E, q4 t2 yint main(void) 4 m: [( r! U+ S3 Y3 p& f6 ^
{ - V8 w2 j: b- B; b) K: H
int handle;
9 _$ T+ y3 [+ H4 @+ j; @char buf[11] = "0123456789"; q& {0 ?2 k& R0 B5 f! y
/* change the default file mode from text to binary */
B& l h# j9 I( l_fmode = O_BINARY; 0 G! q3 q7 W! \ e; ~2 b4 g
/* create a binary file for reading and writing */ + u# z) i4 z0 `
handle = creat("DUMMY.FIL", S_IREAD | S_IWRITE); . g7 ~. \) P4 S- H) w6 v) b2 b4 K( \
/* write 10 bytes to the file */
# g) Z" S6 e) [2 ?. i1 Awrite(handle, buf, strlen(buf));
* [$ J! [- C, Z2 o/ h' u/* close the file */
2 v+ ^2 C" N9 i- t0 H: }! b. aclose(handle); 0 T0 T Q) J v# A; U5 u! }% f6 X
return 0; 9 b* n0 Q$ j$ q) F6 I
} ! n( V. \$ [/ H" ]+ ]' \" i
' F8 j) E+ v2 f, `' D% q2 P% Q函数名: creatnew
! n \. C- R' ^5 r, Y: R+ B6 h功 能: 创建一个新文件 ( Q* i% H3 I- l
用 法: int creatnew(const char *filename, int attrib); 3 d+ f. t* B: i
程序例:
4 b s& ^3 B7 n$ ~$ B, ^. {4 p#include 0 {6 }/ @7 v# m/ I) @ A
#include b, c" I) w" I- a# g1 s2 R' \
#include
8 ?' N, Z' E+ ]" u- a$ C% m6 C$ @#include 0 P- N) W5 o* u
#include
8 Q- h* Z, w/ ]7 H' i# B* Pint main(void)
E9 w8 d. W$ ?9 E/ L{ / P& A. e3 V! Q( c9 l) ~: t
int handle; + z7 B. ]* T; d% _
char buf[11] = "0123456789"; 9 V% ?9 o8 W; y5 F# R3 L0 x1 j; s
/* attempt to create a file that doesn't already exist */
/ d& z* W. o& z4 Khandle = creatnew("DUMMY.FIL", 0); 1 A- l: b6 I* J! f* y% j5 ]
if (handle == -1)
+ q7 _' F: c0 X$ ?. R5 i' S/ {; uprintf("DUMMY.FIL already exists.\n"); : I; V8 J4 x/ W0 P) _0 P/ `9 N
else " \# I- U7 ^6 ^
{
1 E* T) ] A/ Q `8 r3 D Yprintf("DUMMY.FIL successfully created.\n"); , P/ N4 b% S) y) ^/ x+ Y
write(handle, buf, strlen(buf)); 5 t9 Q/ b, _. a. m, j' k
close(handle); - l# v8 x6 B( f- p- p
}
& e0 [( P: `! e: W, W5 X6 `! B) i! Lreturn 0; # \# R6 T4 f8 x+ l; ~( A; r
}
" E2 F$ N# @$ w4 K G" p- y# S
, A8 [7 X* ` I3 }& ^ N z; ]9 z) e' i5 a* P2 N
. P# a3 d" E/ Y9 e1 \函数名: creattemp / I% [8 R; X! U" ?& J6 \
功 能: 创建一个新文件或重写一个已存在的文件
0 _6 }8 k$ q9 p& H3 t用 法: int creattemp(const char *filename, int attrib); : o7 c+ f, J. N( x6 x0 }
程序例: 0 Q* Z1 o1 e9 m) a1 M N. \" r# }
#include
$ V8 ]+ F' k1 Y Q; u E0 z$ i. k#include
7 z! ]$ U9 Z& r#include . i' i% Z" f0 |1 t4 m
int main(void)
& }$ T6 D% ]" c; ~0 u! |5 X{
; L \+ C0 b, f/ g# i/ k4 I$ Dint handle;
. }+ ~# r/ h- [; o3 }2 N8 ^char pathname[128]; " h" i/ |7 A6 w* U' F& Q
strcpy(pathname, "\\"); 2 x2 ~) e7 e0 X6 |1 p
/* create a unique file in the root directory */ 4 y6 Q; V1 c4 s4 G8 P
handle = creattemp(pathname, 0); 3 @( ]1 L3 z6 N. I/ A
printf("%s was the unique file created.\n", pathname);
4 D( n' N$ x' J+ h% ^" J. pclose(handle);
+ d" S, l: E$ Hreturn 0; 8 l0 i! k1 u: X+ Z9 g
} ) z% u$ `5 H7 x' C, v" s
3 M) l M" @' \5 j# y* R
2 V4 @/ ]7 r7 W) k- G: C, r4 Y
% F6 t b4 w. N, `$ V9 l
函数名: cscanf
! \' i c1 b- H& _& @功 能: 从控制台执行格式化输入
6 d# D: G/ r5 V0 f3 e用 法: int cscanf(char *format[,argument, ...]);
* C" F* |, w9 c; H% w程序例:
7 x2 f c9 Z* M+ Y& ^6 @, e2 e#include 9 w: a: X# p3 y/ c2 i
int main(void) 4 d6 \! @8 M7 d1 A' A! S/ X
{ 3 N# t# y5 w8 ?: y! i1 s
char string[80];
$ Y& M9 P; |; V/* clear the screen */
8 T% P( G4 x5 R" O/ j- P, J# Iclrscr(); 5 V7 {5 Q9 K* N( i( G- m' |
/* Prompt the user for input */ 6 U- m" r. s$ F P( k
cprintf("Enter a string with no spaces:"); C$ W& M% N9 \# O" U2 ~' j, F7 ?
/* read the input */
) s6 m4 J$ J: s/ j7 W s4 W6 C. J, Gcscanf("%s", string);
! H/ @; |/ f3 X" n* H( j. e/ d5 K7 P/* display what was read */ 6 O; @1 h8 [4 |; K: v9 a
cprintf("\r\nThe string entered is: %s", string);
6 [2 L, _4 V. z5 L( ureturn 0; ' h' k ^/ b; u' j2 N4 q! e
}
3 Y! G3 x2 H7 [2 F- Q& c
8 D% C7 R+ ^6 E2 \+ e- g
# y5 C. t2 \/ p- m7 T! B7 W 9 e* p4 g! I/ }* t8 v# Y' X
函数名: ctime
8 N, G" r2 }. `8 ]; P, h功 能: 把日期和时间转换为字符串
6 g- U3 d% o: J% u用 法: char *ctime(const time_t *time);
/ L7 J1 ]9 `5 K程序例: 1 t: @% h6 g5 ?" g. v4 V
#include 5 ^( w+ @- Q7 n# b1 s+ O- A7 e
#include
0 c- t9 U1 Y: T8 b0 |& _int main(void) ) ?; H7 I" V6 N! D) ?
{ " h# q. v% C- j: s! y
time_t t;
" W9 T' V; e/ A9 z: ctime(&t); 1 K3 Q: ^! a, |
printf("Today's date and time: %s\n", ctime(&t));
9 \' r7 o4 |! f) q7 s" k0 Mreturn 0;
' X3 h k$ i; Q( Z6 f( }( _# V2 P}
$ ]! Q# c5 u& U9 K% u1 n; F4 A$ B4 }3 v5 l+ b3 i
% }: {4 T' Q+ P: A
7 O$ D) b+ f5 X3 I* E
函数名: ctrlbrk
9 N7 ]; C% b1 f: i& X, k5 F7 T功 能: 设置Ctrl-Break处理程序 6 {5 \3 m f, r
用 法: void ctrlbrk(*fptr)(void);
. `' u8 W: E1 ]+ `3 g. j程序例:
' A, \' X7 Y4 }6 a2 Q#include
6 i/ D5 w2 g* Y1 o. ?#include ' G4 c1 \4 x: V7 _* l( l
#define ABORT 0
. c5 J8 d% h5 K# }( cint c_break(void)
& C! D4 V! r4 t: w4 I6 N{ 4 j( @% r" ^: J
printf("Control-Break pressed. Program aborting ...\n"); / E# a$ Y3 u, _2 Z: N$ v! x
return (ABORT);
, ?6 |% b6 d3 j: t8 i2 T}
* s! U! `4 x+ Q* U, q; eint main(void)
) ^' w, T, B8 q{ 3 r- w8 \2 }( {
ctrlbrk(c_break); + p. M4 b; B5 B+ w8 U! B0 @: g. ]
for(;;)
/ ]& j3 |% }+ g8 G{ : g: T7 a. v; O* W
printf("Looping... Press to quit:\n");
1 k e2 `) }' ~3 q1 E& _9 N8 K2 V; n} ' H1 @0 W1 Y/ J; M. q0 d
return 0;
7 W- }/ R% r$ R, M. Q- A+ h! s: {} |