資源描述:
《常用c語(yǔ)言標(biāo)準(zhǔn)庫(kù)函數(shù)》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在應(yīng)用文檔-天天文庫(kù)。
1、清屏函數(shù)clrscr();//clearscreenprintf("Pressakey");for(;;){c=getchar();clrscr();printf("%c:%sletter",c,isalpha(c)?"is":"not");}return0;//justtoavoidwarningsbycompiler}函數(shù)resort,能在一個(gè)數(shù)列中,對(duì)從指定位置begin開(kāi)始的n個(gè)數(shù),按相反順序重新排列//例如數(shù)組a為1,2,3,4,5,6,7,8//resort(a,3,4);表示從數(shù)組a的第三個(gè)元素開(kāi)始,對(duì)后面的四個(gè)元素(4,5,6,7)反序
2、排列//c中元素從0開(kāi)始====================字符函數(shù):ctype.h========================intisalpha(intch)若ch是字母('A'-'Z','a'-'z')返回非0值,否則返回0intisalnum(intch)若ch是字母('A'-'Z','a'-'z')或數(shù)字('0'-'9')intisascii(intch)若ch是字符(ASCII碼中的0-127)返回非0值,否則返回0intiscntrl(intch)若ch是作廢字符(0x7F)或普通控制字符(0x00-0x1F)返回非0值,否則返回
3、0intisdigit(intch)若ch是數(shù)字('0'-'9')返回非0值,否則返回0intisgraph(intch)若ch是可打印字符(不含空格)(0x21-0x7E)返回非0值,否則返回0intislower(intch)若ch是小寫字母('a'-'z')返回非0值,否則返回0intisprint(intch)若ch是可打印字符(含空格)(0x20-0x7E)返回非0值,否則返回0intispunct(intch)若ch是標(biāo)點(diǎn)字符(0x00-0x1F)返回非0值,否則返回0intisspace(intch)若ch是空格(''),水平制表符('
4、t'),回車符('r'),走紙換行('f'),垂直制表符('v'),換行符('')intisupper(intch)若ch是大寫字母('A'-'Z')返回非0值,否則返回0intisxdigit(intch)若ch是16進(jìn)制數(shù)('0'-'9','A'-'F','a'-'f')返回非0值,inttolower(intch)若ch是大寫字母('A'-'Z')返回相應(yīng)的小寫字母('a'-'z')inttoupper(intch)若ch是小寫字母('a'-'z')返回相應(yīng)的大寫字母('A'-'Z')==================數(shù)學(xué)函數(shù)math
5、.h===========================intabs(inti)返回整型參數(shù)i的絕對(duì)值doublecabs(structcomplexznum)返回復(fù)數(shù)znum的絕對(duì)值doublefabs(doublex)返回雙精度參數(shù)x的絕對(duì)值longlabs(longn)返回長(zhǎng)整型參數(shù)n的絕對(duì)值doubleexp(doublex)返回指數(shù)函數(shù)ex的值doublefrexp(doublevalue,inteptr)返回value=x2n中x的值,n存貯在eptr中doubleldexp(doublevalue,intexp);返回value2exp
6、的值doublelog(doublex)返回logex的值doublelog10(doublex)返回log10x的值doublepow(doublex,doubley)返回xy的值doublepow10(intp)返回10p的值doublesqrt(doublex)返回x的開(kāi)方doubleacos(doublex)返回x的反余弦cos-1(x)值,x為弧度doubleasin(doublex)返回x的反正弦sin-1(x)值,x為弧度doubleatan(doublex)返回x的反正切tan-1(x)值,x為弧度doubleatan2(doubley
7、,doublex)返回y/x的反正切tan-1(x)值,y的x為弧度doublecos(doublex)返回x的余弦cos(x)值,x為弧度doublesin(doublex)返回x的正弦sin(x)值,x為弧度doubletan(doublex)返回x的正切tan(x)值,x為弧度doublecosh(doublex)返回x的雙曲余弦cosh(x)值,x為弧度doublesinh(doublex)返回x的雙曲正弦sinh(x)值,x為弧度doubletanh(doublex)返回x的雙曲正切tanh(x)值,x為弧度doublehypot(doubl
8、ex,doubley)返回直角三角形斜邊的長(zhǎng)度(z),x和y為直角邊的長(zhǎng)度,z2=x2+y2d