亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? c函數大全.txt

?? 關于c中的一些函數用法的說明
?? TXT
?? 第 1 頁 / 共 5 頁
字號:
} 

void flush(FILE *stream) 
{ 
int duphandle; 

/* flush TC's internal buffer */ 
fflush(stream); 

/* make a duplicate file handle */ 
duphandle = dup(fileno(stream)); 

/* close the duplicate handle to flush the 
DOS buffer */ 
close(duphandle); 
} 



函數名: dup2 
功 能: 復制文件句柄 
用 法: int dup2(int oldhandle, int newhandle); 
程序例: 

#include 
#include 
#include 
#include 

int main(void) 
{ 
#define STDOUT 1 

int nul, oldstdout; 
char msg[] = "This is a test"; 

/* create a file */ 
nul = open("DUMMY.FIL", O_CREAT | O_RDWR, 
S_IREAD | S_IWRITE); 

/* create a duplicate handle for standard 
output */ 
oldstdout = dup(STDOUT); 
/* 
redirect standard output to DUMMY.FIL 
by duplicating the file handle onto the 
file handle for standard output. 
*/ 
dup2(nul, STDOUT); 

/* close the handle for DUMMY.FIL */ 
close(nul); 

/* will be redirected into DUMMY.FIL */ 
write(STDOUT, msg, strlen(msg)); 

/* restore original standard output 
handle */ 
dup2(oldstdout, STDOUT); 

/* close duplicate handle for STDOUT */ 
close(oldstdout); 

return 0; 
} 


函數大全(e開頭)



函數名: ecvt 
功 能: 把一個浮點數轉換為字符串 
用 法: char ecvt(double value, int ndigit, int *decpt, int *sign); 
程序例: 

#include 
#include 
#include 

int main(void) 
{ 
char *string; 
double value; 
int dec, sign; 
int ndig = 10; 

clrscr(); 
value = 9.876; 
string = ecvt(value, ndig, &dec, &sign); 
printf("string = %s dec = %d \ 
sign = %d\n", string, dec, sign); 

value = -123.45; 
ndig= 15; 
string = ecvt(value,ndig,&dec,&sign); 
printf("string = %s dec = %d sign = %d\n", 
string, dec, sign); 


value = 0.6789e5; /* scientific 
notation */ 
ndig = 5; 
string = ecvt(value,ndig,&dec,&sign); 
printf("string = %s dec = %d\ 
sign = %d\n", string, dec, sign); 

return 0; 
} 



函數名: ellipse 
功 能: 畫一橢圓 
用 法: void far ellipse(int x, int y, int stangle, int endangle, 
int xradius, int yradius); 
程序例: 

#include 
#include 
#include 
#include 

int main(void) 
{ 
/* request auto detection */ 
int gdriver = DETECT, gmode, errorcode; 
int midx, midy; 
int stangle = 0, endangle = 360; 
int xradius = 100, yradius = 50; 

/* initialize graphics, local variables */ 
initgraph(&gdriver, &gmode, ""); 

/* read result of initialization */ 
errorcode = graphresult(); 
if (errorcode != grOk) 
/* an error occurred */ 
{ 
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 ellipse */ 
ellipse(midx, midy, stangle, endangle, 
xradius, yradius); 

/* clean up */ 
getch(); 
closegraph(); 
return 0; 
} 



函數名: enable 
功 能: 開放硬件中斷 
用 法: void enable(void); 
程序例: 

/* ** NOTE: 
This is an interrupt service routine. You can NOT compile this program 
with Test Stack Overflow turned on and get an executable file which will 
operate correctly. 
*/ 

#include 
#include 
#include 

/* The clock tick interrupt */ 
#define INTR 0X1C 

void interrupt ( *oldhandler)(void); 

int count=0; 

void interrupt handler(void) 
{ 
/* 
disable interrupts during the handling of the interrupt 
*/ 
disable(); 
/* increase the global counter */ 
count++; 
/* 
re enable interrupts at the end of the handler 
*/ 
enable(); 
/* call the old routine */ 
oldhandler(); 
} 

int main(void) 
{ 
/* save the old interrupt vector */ 
oldhandler = getvect(INTR); 

/* install the new interrupt handler */ 
setvect(INTR, handler); 

/* loop until the counter exceeds 20 */ 
while (count < 20) 
printf("count is %d\n",count); 

/* reset the old interrupt handler */ 
setvect(INTR, oldhandler); 

return 0; 
} 



函數名: eof 
功 能: 檢測文件結束 
用 法: int eof(int *handle); 
程序例: 

#include 
#include 
#include 
#include 
#include 

int main(void) 
{ 
int handle; 
char msg[] = "This is a test"; 
char ch; 

/* create a file */ 
handle = open("DUMMY.FIL", 
O_CREAT | O_RDWR, 
S_IREAD | S_IWRITE); 

/* write some data to the file */ 
write(handle, msg, strlen(msg)); 

/* seek to the beginning of the file */ 
lseek(handle, 0L, SEEK_SET); 

/* 
reads chars from the file until hit EOF 
*/ 
do 
{ 
read(handle, &ch, 1); 
printf("%c", ch); 
} while (!eof(handle)); 

close(handle); 
return 0; 
} 



函數名: exec... 
功 能: 裝入并運行其它程序的函數 
用 法: int execl(char *pathname, char *arg0, arg1, ..., argn, NULL); 
int execle(char *pathname, char *arg0, arg1, ..., argn, NULL, 
char *envp[]); 
int execlp(char *pathname, char *arg0, arg1, .., NULL); 
int execple(char *pathname, char *arg0, arg1, ..., NULL, 
char *envp[]); 
int execv(char *pathname, char *argv[]); 
int execve(char *pathname, char *argv[], char *envp[]); 
int execvp(char *pathname, char *argv[]); 
int execvpe(char *pathname, char *argv[], char *envp[]); 
程序例: 

/* execv example */ 
#include 
#include 
#include 

void main(int argc, char *argv[]) 
{ 
int i; 

printf("Command line arguments:\n"); 
for (i=0; i printf("[%2d] : %s\n", i, argv[i]); 

printf("About to exec child with arg1 arg2 ...\n"); 
execv("CHILD.EXE", argv); 

perror("exec error"); 

exit(1); 
} 



函數名: exit 
功 能: 終止程序 
用 法: void exit(int status); 
程序例: 

#include 
#include 
#include 

int main(void) 
{ 
int status; 

printf("Enter either 1 or 2\n"); 
status = getch(); 
/* Sets DOS errorlevel */ 
exit(status - '0'); 

/* Note: this line is never reached */ 
return 0; 
} 



函數名: exp 
功 能: 指數函數 
用 法: double exp(double x); 
程序例: 

#include 
#include 

int main(void) 
{ 
double result; 
double x = 4.0; 

result = exp(x); 
printf("'e' raised to the power \ 
of %lf (e ^ %lf) = %lf\n", 
x, x, result); 

return 0; 
}


函數大全(e開頭)



函數名: ecvt 
功 能: 把一個浮點數轉換為字符串 
用 法: char ecvt(double value, int ndigit, int *decpt, int *sign); 
程序例: 

#include 
#include 
#include 

int main(void) 
{ 
char *string; 
double value; 
int dec, sign; 
int ndig = 10; 

clrscr(); 
value = 9.876; 
string = ecvt(value, ndig, &dec, &sign); 
printf("string = %s dec = %d \ 
sign = %d\n", string, dec, sign); 

value = -123.45; 
ndig= 15; 
string = ecvt(value,ndig,&dec,&sign); 
printf("string = %s dec = %d sign = %d\n", 
string, dec, sign); 


value = 0.6789e5; /* scientific 
notation */ 
ndig = 5; 
string = ecvt(value,ndig,&dec,&sign); 
printf("string = %s dec = %d\ 
sign = %d\n", string, dec, sign); 

return 0; 
} 



函數名: ellipse 
功 能: 畫一橢圓 
用 法: void far ellipse(int x, int y, int stangle, int endangle, 
int xradius, int yradius); 
程序例: 

#include 
#include 
#include 
#include 

int main(void) 
{ 
/* request auto detection */ 
int gdriver = DETECT, gmode, errorcode; 
int midx, midy; 
int stangle = 0, endangle = 360; 
int xradius = 100, yradius = 50; 

/* initialize graphics, local variables */ 
initgraph(&gdriver, &gmode, ""); 

/* read result of initialization */ 
errorcode = graphresult(); 
if (errorcode != grOk) 
/* an error occurred */ 
{ 
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 ellipse */ 
ellipse(midx, midy, stangle, endangle, 
xradius, yradius); 

/* clean up */ 
getch(); 
closegraph(); 
return 0; 
} 



函數名: enable 
功 能: 開放硬件中斷 
用 法: void enable(void); 
程序例: 

/* ** NOTE: 
This is an interrupt service routine. You can NOT compile this program 
with Test Stack Overflow turned on and get an executable file which will 
operate correctly. 
*/ 

#include 
#include 
#include 

/* The clock tick interrupt */ 
#define INTR 0X1C 

void interrupt ( *oldhandler)(void); 

int count=0; 

void interrupt handler(void) 
{ 
/* 
disable interrupts during the handling of the interrupt 
*/ 
disable(); 
/* increase the global counter */ 
count++; 
/* 
re enable interrupts at the end of the handler 
*/ 
enable(); 
/* call the old routine */ 
oldhandler(); 
} 

int main(void) 
{ 
/* save the old interrupt vector */ 
oldhandler = getvect(INTR); 

/* install the new interrupt handler */ 
setvect(INTR, handler); 

/* loop until the counter exceeds 20 */ 
while (count < 20) 
printf("count is %d\n",count); 

/* reset the old interrupt handler */ 
setvect(INTR, oldhandler); 

return 0; 
} 



函數名: eof 
功 能: 檢測文件結束 
用 法: int eof(int *handle); 
程序例: 

#include 
#include 
#include 
#include 
#include 

int main(void) 
{ 
int handle; 
char msg[] = "This is a test"; 
char ch; 

/* create a file */ 
handle = open("DUMMY.FIL", 
O_CREAT | O_RDWR, 
S_IREAD | S_IWRITE); 

/* write some data to the file */ 
write(handle, msg, strlen(msg)); 

/* seek to the beginning of the file */ 
lseek(handle, 0L, SEEK_SET); 

/* 
reads chars from the file until hit EOF 
*/ 
do 
{ 
read(handle, &ch, 1); 
printf("%c", ch); 
} while (!eof(handle)); 

close(handle); 
return 0; 
} 



函數名: exec... 
功 能: 裝入并運行其它程序的函數 
用 法: int execl(char *pathname, char *arg0, arg1, ..., argn, NULL); 
int execle(char *pathname, char *arg0, arg1, ..., argn, NULL, 
char *envp[]); 
int execlp(char *pathname, char *arg0, arg1, .., NULL); 
int execple(char *pathname, char *arg0, arg1, ..., NULL, 
char *envp[]); 
int execv(char *pathname, char *argv[]); 
int execve(char *pathname, char *argv[], char *envp[]); 
int execvp(char *pathname, char *argv[]); 
int execvpe(char *pathname, char *argv[], char *envp[]); 
程序例: 

/* execv example */ 
#include 
#include 
#include 

void main(int argc, char *argv[]) 
{ 
int i; 

printf("Command line arguments:\n"); 
for (i=0; i printf("[%2d] : %s\n", i, argv[i]); 

printf("About to exec child with arg1 arg2 ...\n"); 
execv("CHILD.EXE", argv); 

perror("exec error"); 

exit(1); 
} 



函數名: exit 
功 能: 終止程序 
用 法: void exit(int status); 
程序例: 

#include 
#include 
#include 

int main(void) 
{ 
int status; 

printf("Enter either 1 or 2\n"); 
status = getch(); 
/* Sets DOS errorlevel */ 
exit(status - '0'); 

/* Note: this line is never reached */ 
return 0; 
} 



函數名: exp 
功 能: 指數函數 
用 法: doubl函數大全(f開頭)

double fabs(double x);

返回雙精度x的絕對值。



void far *farcalloc(unsigned long nunits,unsigned long unitsz);

堆中給含有nu從遠nits個元素的,每個元素占用unitsz個字節長的數組分配存貯區。
成功是返回指向新分配的內存塊的指針;若存貯空間不夠,返回NULL。

 

unsigned long farcoreleft(void);

返回遠堆中未用存貯區的大小。



void farfree(void far *block);

釋放遠堆中以前所分配內存塊。



void far *farmalloc(unsigned long nbytes);

從遠堆分配長nbytes字節的內存塊,返回新地址。



void far *farrealloc(void far *oldblock,unsigned long nbytes);

調整已分配的內存塊的大小為nbytes。需要的話,可把塊中的內容復制到新位置。要注意:所有的可用的RAM可被分配,大于64K的塊可被分配。
遠指針用于存取被分配的塊。返回重新分配的內存塊的地址。若存貯塊重新分配失敗,返回NULL。

struct fcb {

char fcb_drive; /* 0 = default, 1 = A, 2 = B */

char fcb_name[8]; /* File name */

char fcb_ext[3]; /* File extension */

short fcb_curblk; /* Current block number */

short fcb_recsize; /* Logical record size in bytes */

long fcb_filsize; /* File size in bytes */

short fcb_date; /* Date file was last written */

char fcb_resv[10]; /* Reserved for DOS */

char fcb_currec; /* Current record in block */

long fcb_random; /* Random record number */

};

 


int fclose(FILE *stream);

關閉一個流。

成功返回0;失敗是返回EOF。

int fcloseall(void);

關閉所有打開的流,除了stdin,stdout,stdprn,stderr和stdaux。





char *fcvt(double value,int ndig,int *dec,int *sign);

把浮點數轉換成字符串,把浮點數value轉換成長度為ndig的以空字符終結的字符串,返回一個指向這個字符串的指針,相對于串的開始處,
小數點的位置,由dec間接存貯,dec若為負值,表示小數點在返回的字符串的左邊。返回的字符串本身不帶小數點。如果value的符號為負,由sign指向的值非零;否則它是零。


 

FILE *fdopen(int handle,char *type);

把流與一個文件描述字相聯系地打開。fdopen使流stream與一個從creat,dup,dup2或open得到的文件描述字相聯系。流的類型type必須與打開文件描述字handle的模式相匹配。

類型字符串type可以是下列值之一:

r,打開用于只讀;

w,創建用于寫;

a,打開用于寫在原有內容后面,文件不存在時創建用于寫;

r+,打開已存在的文件用于更新(讀和寫);

a+,添加打開,文件不存在時創建,在末尾更新。成功時返回新打開的流。出錯時返回NULL。

 



?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久成人麻豆午夜电影| 亚洲免费看黄网站| 精品无码三级在线观看视频| 在线不卡中文字幕| 男女男精品视频网| 久久你懂得1024| 99久久er热在这里只有精品15 | 欧美这里有精品| 天天操天天综合网| 日韩美一区二区三区| 国产91在线|亚洲| 亚洲免费视频成人| 宅男在线国产精品| 国产高清在线精品| 亚洲日本青草视频在线怡红院 | 欧美大片在线观看一区| 国产一区二区三区日韩| 自拍偷拍亚洲综合| 日韩免费性生活视频播放| 国产91精品一区二区麻豆网站| 一区二区三区自拍| 精品三级在线看| 91精彩视频在线观看| 另类中文字幕网| 亚洲视频一区在线| 欧美成人伊人久久综合网| 91浏览器打开| 国内不卡的二区三区中文字幕| 亚洲视频一区二区在线观看| 日韩一级二级三级| 91国产精品成人| 国产高清视频一区| 日韩在线一区二区三区| 欧美国产日产图区| 91精品欧美综合在线观看最新| 国产成人免费网站| 丝袜美腿亚洲一区| 亚洲精品视频免费看| 精品精品欲导航| 欧美日韩精品一区二区天天拍小说| 国产精品一区二区果冻传媒| 亚洲国产精品嫩草影院| 18欧美亚洲精品| 亚洲精品在线观| 日韩欧美卡一卡二| 欧美日韩一区三区| 日本国产一区二区| 波多野结衣一区二区三区 | 日韩精品一区在线| 欧美午夜寂寞影院| 成人av在线电影| 国产自产v一区二区三区c| 天天av天天翘天天综合网| 亚洲欧洲国产日韩| 中文字幕国产一区二区| 欧美大片顶级少妇| 91麻豆精品国产91久久久久久| 91丨porny丨在线| 成人久久视频在线观看| 精品影视av免费| 免费三级欧美电影| 日韩av一级片| 秋霞电影网一区二区| 亚洲va在线va天堂| 午夜在线成人av| 亚洲一区二区三区四区在线免费观看| 日韩美女视频一区二区 | 国产午夜精品一区二区三区视频| 日韩欧美一区在线观看| 在线91免费看| 91精品国产福利| 欧美一级一区二区| 欧美一级生活片| 日韩欧美一级二级三级久久久 | 欧美变态tickling挠脚心| 在线不卡a资源高清| 欧美一区二区私人影院日本| 91精品国模一区二区三区| 91精品国产麻豆国产自产在线| 91精品国产91综合久久蜜臀| 欧美一级夜夜爽| 精品国产露脸精彩对白| 久久久国际精品| 国产精品免费视频一区| 亚洲欧美日本在线| 亚洲国产日日夜夜| 亚洲第一激情av| 久久精品国产第一区二区三区| 久久草av在线| 成人免费av在线| 日本久久一区二区| 欧美日韩激情一区| 日韩欧美久久久| 欧美国产禁国产网站cc| 亚洲精品久久7777| 日本三级亚洲精品| 高清不卡在线观看av| 色狠狠综合天天综合综合| 制服丝袜在线91| 国产欧美日韩久久| 一区二区三区 在线观看视频| 午夜婷婷国产麻豆精品| 国产最新精品免费| 91亚洲精品久久久蜜桃| 欧美精品123区| 国产欧美日韩麻豆91| 亚洲一区二区美女| 久久av资源网| 在线亚洲免费视频| 精品乱人伦小说| 日韩美女视频一区| 另类成人小视频在线| 99精品国产99久久久久久白柏| 欧美午夜不卡视频| 国产日韩欧美不卡| 亚洲国产成人tv| 国产99精品在线观看| 欧美三电影在线| 中文字幕国产精品一区二区| 香蕉久久一区二区不卡无毒影院| 国产乱色国产精品免费视频| 色一情一乱一乱一91av| 精品人伦一区二区色婷婷| 综合久久一区二区三区| 国产一区二区中文字幕| 欧美日韩专区在线| 中文字幕av一区 二区| 日本特黄久久久高潮| 日本韩国一区二区| 国产欧美日产一区| 蜜桃久久久久久| 欧美一a一片一级一片| 国产精品免费av| 国内成人免费视频| 欧美一区二区在线视频| 亚洲免费观看视频| 国产不卡一区视频| 日韩久久久精品| 视频一区中文字幕| 99re成人精品视频| 国产精品色一区二区三区| 久久电影网站中文字幕| 欧美综合天天夜夜久久| 国产精品久久久99| 国产激情视频一区二区在线观看| 日韩一卡二卡三卡四卡| 亚洲动漫第一页| 91小视频免费观看| 国产精品久久夜| 高清不卡一二三区| 久久天堂av综合合色蜜桃网| 日韩中文字幕亚洲一区二区va在线| 91麻豆产精品久久久久久| 国产精品素人一区二区| 处破女av一区二区| 久久亚洲欧美国产精品乐播 | 国产在线视视频有精品| 欧美一级艳片视频免费观看| 日本三级亚洲精品| 91精品国产综合久久小美女| 日韩福利视频导航| 欧美一级理论性理论a| 毛片一区二区三区| 欧美变态凌虐bdsm| 国内久久精品视频| 久久久久久99久久久精品网站| 韩国视频一区二区| 久久婷婷综合激情| 国产成人av资源| 国产精品视频yy9299一区| 高清不卡在线观看| 亚洲天堂成人在线观看| 91免费国产在线观看| 亚洲天堂av老司机| 欧美曰成人黄网| 亚洲444eee在线观看| 日韩一区二区三区视频在线观看| 久久av中文字幕片| 欧美激情一区二区三区全黄| www.色精品| 亚洲国产成人av好男人在线观看| 欧美日韩国产在线播放网站| 三级不卡在线观看| 精品少妇一区二区三区视频免付费| 国产原创一区二区| 欧美激情一区二区三区全黄| 色婷婷亚洲综合| 日本不卡高清视频| 久久精品视频免费观看| 成人国产免费视频| 香蕉乱码成人久久天堂爱免费| 日韩天堂在线观看| 成人性视频网站| 亚洲午夜影视影院在线观看| 欧美大片在线观看一区二区| 成人动漫中文字幕| 午夜国产精品影院在线观看| 亚洲精品一区在线观看| 91色婷婷久久久久合中文| 日韩国产欧美在线视频|