亚洲香蕉成人av网站在线观看_欧美精品成人91久久久久久久_久久久久久久久久久亚洲_热久久视久久精品18亚洲精品_国产精自产拍久久久久久_亚洲色图国产精品_91精品国产网站_中文字幕欧美日韩精品_国产精品久久久久久亚洲调教_国产精品久久一区_性夜试看影院91社区_97在线观看视频国产_68精品久久久久久欧美_欧美精品在线观看_国产精品一区二区久久精品_欧美老女人bb

首頁 > 學院 > 開發設計 > 正文

C語言庫函數 (A類字母)

2019-11-17 05:00:06
字體:
來源:轉載
供稿:網友
[ 發表日期:2002-1-4 9:28:46 ]

函數名: abort
功 能: 異常終止一個進程
用 法: void abort(void);
程序例:
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
abort();
return 0; /* This is never reached */
} 函數名: abs
功 能: 求整數的絕對值
用 法: int abs(int i);
程序例:
#include <stdio.h>
#include <math.h> int main(void)
{
int number = -1234; printf("number: %d absolute value: %d/n", number, abs(number));
return 0;
} 函數名: absread, abswirte
功 能: 絕對磁盤扇區讀、寫數據
用 法: int absread(int drive, int nsects, int sectno, void *buffer);
int abswrite(int drive, int nsects, in tsectno, void *buffer);
程序例:
/* absread example */ #include <stdio.h>
#include <conio.h>
#include <process.h>
#include <dos.h> int main(void)
{
int i, strt, ch_out, sector;
char buf[512]; printf("Insert a diskette into drive A and press any key/n");
getch();
sector = 0;
if (absread(0, 1, sector, &buf) != 0)
{
perror("Disk problem");
exit(1);
}
printf("Read OK/n");
strt = 3;
for (i=0; i<80; i++)
{
ch_out = buf[strt+i];
putchar(ch_out);
}
printf("/n");
return(0);
}
函數名:
access
功 能: 確定文件的訪問權限
用 法: int access(const char *filename, int amode);
程序例:
#include <stdio.h>
#include <io.h> int file_exists(char *filename); int main(void)
{
printf("Does NOTEXIST.FIL exist: %s/n",
file_exists("NOTEXISTS.FIL") ? "YES" : "NO");
return 0;
} int file_exists(char *filename)
{
return (access(filename, 0) == 0);
}
函數名: acos
功 能: 反余弦函數
用 法: double acos(double x);
程序例:
#include <stdio.h>
#include <math.h> int main(void)
{
double result;
double x = 0.5; result = acos(x);
printf("The arc cosine of %lf is %lf/n", x, result);
return 0;
} 函數名: allocmem
功 能: 分配DOS存儲段
用 法: int allocmem(unsigned size, unsigned *seg);
程序例:
#include <dos.h>
#include <alloc.h>
#include <stdio.h> int main(void)
{
unsigned int size, segp;
int stat; size = 64; /* (64 x 16) = 1024 bytes */
stat = allocmem(size, &segp);
if (stat == -1)
printf("Allocated memory at segment: %x/n", segp);
else
printf("Failed: maximum number of paragraphs available is %u/n",
stat); return 0;
} 函數名: arc
功 能: 畫一弧線
用 法: void far arc(int x, int y, int stangle, int endangle, int radius);
程序例:
#include <graphics.h>

#include <stdlib.h>
#include <stdio.h>
#include <conio.h> int main(void)
{
/* request auto detection */
int gdriver = DETECT, gmode, errorcode;
int midx, midy;
int stangle = 45, endangle = 135;
int radius = 100; /* initialize graphics and local variables */
initgraph(&gdriver, &gmode, ""); /* read result of initialization */
errorcode = graphresult(); /* an error occurred */
if (errorcode != grOk)
{
printf("Graphics error: %s/n", grapherrormsg(errorcode));
printf("Press any key to halt:");
getch(); exit(1); /* terminate with an error code */
} midx = getmaxx() / 2;
midy = getmaxy() / 2;
setcolor(getmaxcolor()); /* draw arc */
arc(midx, midy, stangle, endangle, radius); /* clean up */
getch();
closegraph();
return 0;
} 函數名: asctime
功 能: 轉換日期和時間為ASCII碼
用 法: char *asctime(const strUCt tm *tblock);
程序例:
#include <stdio.h>
#include <string.h>
#include <time.h> int main(void)
{
struct tm t;
char str[80]; /* sample loading of tm structure */ t.tm_sec = 1; /* Seconds */
t.tm_min = 30; /* Minutes */
t.tm_hour = 9; /* Hour */
t.tm_mday = 22; /* Day of the Month */
t.tm_mon = 11; /* Month */
t.tm_year = 56; /* Year - does not include century */
t.tm_wday = 4; /* Day of the week */
t.tm_yday = 0; /* Does not show in asctime */
t.tm_isdst = 0; /* Is Daylight SavTime; does not show in asctime */ /* converts structure to null terminated
string */ strcpy(str, asctime(&t));
printf("%s/n", str); return 0;
}
函數名: asin
功 能: 反正弦函數
用 法: double asin(double x);
程序例:
#include <stdio.h>
#include <math.h> int main(void)
{
double result;
double x = 0.5; result = asin(x);
printf("The arc sin of %lf is %lf/n", x, result);
return(0);
}
函數名: assert
功 能: 測試一個條件并可能使程序終止
用 法: void assert(int test);
程序例:
#include <assert.h>
#include <stdio.h>
#include <stdlib.h> struct ITEM {
int key;
int value;
}; /* add item to list, make sure list is not null */
void additem(struct ITEM *itemptr) {
assert(itemptr != NULL);
/* add item to list */
} int main(void)
{
additem(NULL);
return 0;
}
函數名: atan
功 能: 反正切函數
用 法: double atan(double x);
程序例:
#include <stdio.h>
#include <math.h> int main(void)
{
double result;
double x = 0.5; result = atan(x);
printf("The arc tangent of %lf is %lf/n", x, result);
return(0);
} 函數名: atan2

功 能: 計算Y/X的反正切值
用 法: double atan2(double y, double x);
程序例:
#include <stdio.h>
#include <math.h> int main(void)
{
double result;
double x = 90.0, y = 45.0; result = atan2(y, x);
printf("The arc tangent ratio of %lf is %lf/n", (y / x), result);
return 0;
} 函數名: atexit
功 能: 注冊終止函數
用 法: int atexit(atexit_t func);
程序例:
#include <stdio.h>
#include <stdlib.h> void exit_fn1(void)
{
printf("Exit function #1 called/n");
} void exit_fn2(void)
{
printf("Exit function #2 called/n");
} int main(void)
{
/* post exit function #1 */
atexit(exit_fn1);
/* post exit function #2 */
atexit(exit_fn2);
return 0;
}
函數名: atof
功 能: 把字符串轉換成浮點數
用 法: double atof(const char *nptr);
程序例:
#include <stdlib.h>
#include <stdio.h> int main(void)
{
float f;
char *str = "12345.67"; f = atof(str);
printf("string = %s float = %f/n", str, f);
return 0;
} 函數名: atoi
功 能: 把字符串轉換成長整型數
用 法: int atoi(const char *nptr);
程序例:
#include <stdlib.h>
#include <stdio.h> int main(void)
{
int n;
char *str = "12345.67"; n = atoi(str);
printf("string = %s integer = %d/n", str, n);
return 0;
} 函數名: atol
功 能: 把字符串轉換成長整型數
用 法: long atol(const char *nptr);
程序例: #include <stdlib.h>
#include <stdio.h> int main(void)
{
long l;
char *str = "98765432"; l = atol(lstr);
printf("string = %s integer = %ld/n", str, l);
return(0);
}











發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
亚洲香蕉成人av网站在线观看_欧美精品成人91久久久久久久_久久久久久久久久久亚洲_热久久视久久精品18亚洲精品_国产精自产拍久久久久久_亚洲色图国产精品_91精品国产网站_中文字幕欧美日韩精品_国产精品久久久久久亚洲调教_国产精品久久一区_性夜试看影院91社区_97在线观看视频国产_68精品久久久久久欧美_欧美精品在线观看_国产精品一区二区久久精品_欧美老女人bb
欧美另类高清videos| 亚洲男人天堂网站| 亚洲在线观看视频网站| 国产一区二区三区毛片| 国产视频丨精品|在线观看| 亚洲性无码av在线| 欧美美女操人视频| 日韩成人在线视频网站| 国产成人精品综合久久久| 精品福利免费观看| 这里只有精品久久| 色中色综合影院手机版在线观看| 中文字幕免费精品一区| 日本久久精品视频| 久久成人精品电影| 国产伊人精品在线| 色妞久久福利网| 国产99久久精品一区二区永久免费| 78m国产成人精品视频| 欧美丝袜美女中出在线| 亚洲综合在线中文字幕| 欧美激情精品久久久久| 欧美一级电影在线| 欧美一级黑人aaaaaaa做受| 日韩av在线免费观看| 国产精品视频一区二区高潮| 成人免费视频xnxx.com| 欧美乱大交xxxxx另类电影| 欧美一级淫片播放口| 色偷偷偷综合中文字幕;dd| 久久亚洲国产成人| 色青青草原桃花久久综合| 亚洲成人精品视频在线观看| 久久精品在线播放| 精品中文字幕在线| 国产精品观看在线亚洲人成网| 亚洲欧美变态国产另类| 亚洲精品动漫100p| 日韩动漫免费观看电视剧高清| 欧美中文字幕视频| 国产丝袜精品第一页| 国产精品美女主播在线观看纯欲| 国产99久久久欧美黑人| 亚洲国产天堂久久综合网| 亚洲欧美日韩在线一区| www.欧美精品| 精品中文字幕在线观看| 欧美成人一区二区三区电影| www.欧美免费| 久久精品中文字幕免费mv| 欧美亚洲视频在线观看| 亚洲欧美日韩国产中文| 欧美一性一乱一交一视频| 亚洲偷熟乱区亚洲香蕉av| 亚洲美女在线看| 91国语精品自产拍在线观看性色| 亚洲在线免费观看| 亚洲aⅴ日韩av电影在线观看| 久久综合亚洲社区| 91色视频在线观看| 992tv在线成人免费观看| 日韩精品视频在线免费观看| 亚洲男女自偷自拍图片另类| 久久精品一本久久99精品| 国产一区二区三区日韩欧美| 久久精品色欧美aⅴ一区二区| 日韩专区在线播放| 95av在线视频| 久久精品99久久香蕉国产色戒| 欧美一二三视频| 欧美激情亚洲激情| 久久精品亚洲94久久精品| 国产精品一区二区三区免费视频| 7777免费精品视频| 91精品国产自产91精品| 一区二区三区国产在线观看| 91中文字幕一区| 亚洲精品在线91| 国产成人精品亚洲精品| 日韩欧美在线第一页| 一区二区成人精品| 亚洲激情小视频| 亚洲精品国产综合久久| 亚洲综合在线中文字幕| 中日韩美女免费视频网址在线观看| 亚洲图片在线综合| 欧美在线一级va免费观看| 国产精品视频地址| 成人黄色av免费在线观看| 亚洲欧洲免费视频| 国产亚洲一区二区在线| 亚洲另类欧美自拍| 亚洲成人久久一区| 亚洲三级黄色在线观看| 日韩av一区二区在线| 国产精品久久电影观看| 欧美精品久久一区二区| 欧美人成在线视频| 亚洲最大av网| 久久久国产91| 一级做a爰片久久毛片美女图片| 91精品国产91久久久久久吃药| 久久国产精品视频| 亚洲精品色婷婷福利天堂| 久久免费视频网| 81精品国产乱码久久久久久| 精品国产老师黑色丝袜高跟鞋| 欧美高清视频在线播放| 日韩美女写真福利在线观看| 国产亚洲综合久久| 浅井舞香一区二区| 国产精品99免视看9| 日韩在线观看免费全集电视剧网站| 久久影院资源网| 国产精品综合久久久| 色狠狠久久aa北条麻妃| 亚洲第一av网| 精品福利在线视频| 激情成人中文字幕| 国产亚洲激情在线| 一本一道久久a久久精品逆3p| 精品人伦一区二区三区蜜桃免费| 69影院欧美专区视频| 国产有码一区二区| 欧美日韩福利视频| 奇米四色中文综合久久| 国产一区二区三区高清在线观看| 久久久久久久久久久成人| 精品中文字幕在线| 久久99国产综合精品女同| 精品亚洲一区二区三区四区五区| 成人精品一区二区三区电影黑人| 成人国产亚洲精品a区天堂华泰| 成人网页在线免费观看| 欧美视频免费在线| 在线视频欧美日韩| 久久影院免费观看| 国产盗摄xxxx视频xxx69| 国产精品h片在线播放| 亚洲精品欧美日韩| 性欧美视频videos6一9| 清纯唯美亚洲综合| 欧美xxxx14xxxxx性爽| 欧美日韩亚洲一区二区三区| yw.139尤物在线精品视频| 日本精品免费一区二区三区| 国内精品久久久久| 久久久久女教师免费一区| 国产精品久久久久久久午夜| 亚洲新中文字幕| 亚洲日本欧美中文幕| 久青草国产97香蕉在线视频| 精品国偷自产在线视频99| 大伊人狠狠躁夜夜躁av一区| 91产国在线观看动作片喷水| 亚洲欧洲美洲在线综合| 欧美成人精品激情在线观看| 久久久亚洲影院你懂的| 国产成人一区二区在线| 亚洲精品短视频| 欧美激情第三页| 欧美午夜片欧美片在线观看| 国产精品大陆在线观看| 中文字幕日本精品|