【正文】
ion 2 */ atexit(exit_fn2)。}void exit_fn2(void){ printf(Exit function 2 called\n)。}函數(shù)名: atexit功 能: 注冊(cè)終止函數(shù)用 法: int atexit(atexit_t func)。 printf(The arc tangent ratio of %lf is %lf\n, (y / x), result)。 double x = , y = 。}函數(shù)名: atan2功 能: 計(jì)算Y/X的反正切值用 法: double atan2(double y, double x)。 printf(The arc tangent of %lf is %lf\n, x, result)。 double x = 。}函數(shù)名: atan功 能: 反正切函數(shù)用 法: double atan(double x)。 /* add item to list */}int main(void){ additem(NULL)。}。程序例:include include include struct ITEM { int key。 return(0)。 result = asin(x)。程序例:include include int main(void){ double result。 return 0。t))。 /* Is Daylight SavTime。 /* Day of the week */ = 0。 /* Month */ = 56。 /* Hour */ = 22。 /* Seconds */ = 30。 char str[80]。}函數(shù)名: asctime功 能: 轉(zhuǎn)換日期和時(shí)間為ASCII碼用 法: char *asctime(const struct tm *tblock)。 closegraph()。 /* draw arc */ arc(midx, midy, stangle, endangle, radius)。 midy = getmaxy() / 2。 exit(1)。 printf(Press any key to halt:)。 /* read result of initialization */ errorcode = graphresult()。gdriver, amp。 int radius = 100。 int midx, midy。}函數(shù)名: arc功 能: 畫一弧線用 法: void far arc(int x, int y, int stangle, int endangle, int radius)。 else printf(Failed: maximum number of paragraphs available is %u\n, stat)。segp)。 size = 64。程序例:include include include int main(void){ unsigned int size, segp。 return 0。 result = acos(x)。程序例:include include int main(void){ double result。}int file_exists(char *filename){ return (access(filename, 0) == 0)。int main(void){ printf(Does exist: %s\n, file_exists() ? YES : NO)。}函數(shù)名: access功 能: 確定文件的訪問權(quán)限用 法: int access(const char *filename, int amode)。 } printf(\n)。 i++) { ch_out = buf[strt+i]。 for (i=0。 } printf(Read OK\n)。buf) != 0) { perror(Disk problem)。 sector = 0。 printf(Insert a diskette into drive A and press any key\n)。程序例:/* absread example */include include include include int main(void){ int i, strt, ch_out, sector。}函數(shù)名: absread, abswirte功 能: 絕對(duì)磁盤扇區(qū)讀、寫數(shù)據(jù)用 法: int absread(int drive, int nsects, int sectno, void *buffer)。 printf(number: %d absolute value: %d\n, number, abs(number))。 /* This is never reached */}函數(shù)名: abs功 能: 求整數(shù)的絕對(duì)值用 法: int abs(int i)。 abort()。A函數(shù)名: abort功 能: 異常終止一個(gè)進(jìn)程用 法: void abort(void)。程序例:include include int main(void){ printf(Calling abort()\n)。 return 0。程序例:include include int main(void){ int number = 1234。 return 0。 int abswrite(int drive, int nsects, in tsectno, void *buffer)。 char buf[512]。 getch()。 if (absread(0, 1, sector, amp。 exit(1)。 strt = 3。 i80。 putchar(ch_out)。 return(0)。程序例:include include int file_exists(char *filename)。 return 0。}函數(shù)名: acos功 能: 反余弦函數(shù)用 法: double acos(double x)。 double x = 。 printf(The arc cosine of %lf is %lf\n, x, result)。}函數(shù)名: allocmem功 能: 分配DOS存儲(chǔ)段用 法: int allocmem(unsigned size, unsigned *seg)。 int stat。 /* (64 x 16) = 1024 bytes */ stat = allocmem(size, amp。 if (stat == 1) printf(Allocated memory at segment: %x\n, segp)。 return 0。程序例:include include include include int main(void){ /* request auto detection */ int gdriver = DETECT, gmode, errorcode。 int stangle = 45, endangle = 135。 /* initialize graphics and local variables */ initgraph(amp。gmode, )。 /* an error occurred */ if (errorcode != grOk) { printf(Graphics error: %s\n, grapherrormsg(errorcode))。 getch()。 /* terminate with an error code */ } midx = getmaxx() / 2。 setcolor(getmaxcolor())。 /* clean up */ getch()。 return 0。程序例:include include include int main(void){ struct tm t。 /* sample loading of tm structure */ = 1。 /* Minutes */ = 9。 /* Day of the Month */ = 11。 /* Year does not include century */ = 4。 /* Does not show in asctime */ = 0。 does not show in asctime */ /* converts structure to null terminated string */ strcpy(str, asctime(amp。 printf(%s\n, str)。}函數(shù)名: asin功 能: 反正弦函數(shù)用 法: double asin(double x)。 double x = 。 printf(The arc sin of %lf is %lf\n, x, result)。}函數(shù)名: assert功 能: 測(cè)試一個(gè)條件并可能使程序終止用 法: void assert(int test)。 int value。/* add item to list, make sure list is not null */void additem(struct ITEM *itemptr) { assert(itemptr != NULL)。 return 0。程序例:include include int main(void){ double result。 result = atan(x)。 return(0)。程序例:include include int main(void){ double result。 result = atan2(y, x)。 return 0。程序例:include include void exit_fn1(void){ printf(Exit function 1 called\n)。}int main(void){ /* post exit function 1 */ atexit(exit_fn1)。 return 0。程序例:include include int main(void){ float f。 f = atof(str)。 return 0。程序例:include include int main(void){ int n。 n = atoi(str)。 return 0。程序例:include include int main(void){ long l。 l = atol(lstr)。 return(0)。程序例:include include include include int main(void){ /* request auto detection */ int gdriver = DETECT, gmode, errorcode。 /* initialize graphics and local variables */ initgraph(amp。gmode, )。 if (errorcode != grOk) /* an error occurred */ { printf(Graphics error: %s\n, grapherrormsg(errorcode))。 getch()。 /* terminate with an error code */ } midx = getmaxx() / 2。 /* loop th