版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認(rèn)領(lǐng)
文檔簡介
1、functionprintfintprintf(constfmat...)PrintfmatteddatatostdoutWritestothestardoutput(stdout)asequenceofdatafmattedasthefmatargumentspecifies.Afterthefmatparameterthefunctionexpectsatleastasmanyadditionalargumentsasspecifi
2、edinfmat.ParametersfmatStringthatcontainsthetexttobewrittentostdout.Itcanoptionallycontainembeddedfmattagsthataresubstitutedbythevaluesspecifiedinsubsequentargument(s)fmattedasrequested.Thenumberofargumentsfollowingthefm
3、atparametersshouldatleastbeasmuchasthenumberoffmattags.Thefmattagsfollowthisprototype:%[flags][width][.precision][length]specifierWherespecifieristhemostsignificantonedefinesthetypetheinterpretationofthevalueofthecespond
4、ingargument:specifierOutputExamplecacteradiSigneddecimalinteger392eScientificnotation(mantissaexponent)usingeacter3.9265e2EScientificnotation(mantissaexponent)usingEacter3.9265E2fDecimalfloatingpoint392.65gUsetheshterof%
5、e%f392.65GUsetheshterof%E%f392.65oUnsignedoctal610sStringofacterssampleuUnsigneddecimalinteger7235xUnsignedhexadecimalinteger7faXUnsignedhexadecimalinteger(capitalletters)7FApPointeraddressB800:0000nNothingprinted.Thearg
6、umentmustbeapointertoasignedintwherethenumberofacterswrittensofarissted..Theprecisionisnotspecifiedinthefmatstringbutasanadditionalintegervalueargumentprecedingtheargumentthathastobefmatted.lengthdeionhTheargumentisinter
7、pretedasashtintunsignedshtint(onlyappliestointegerspecifiers:idouxX).lTheargumentisinterpretedasalongintunsignedlongintfintegerspecifiers(idouxX)asawideacterwideacterstringfspecifierscs.LTheargumentisinterpretedasalongdo
8、uble(onlyappliestofloatingpointspecifiers:eEfgG).additionalargumentsDependingonthefmatstringthefunctionmayexpectasequenceofadditionalargumentseachcontainingonevaluetobeedinsteadofeach%tagspecifiedinthefmatparameterifany.
9、Thereshouldbethesamenumberoftheseargumentsasthenumberof%tagsthatexpectavalue.ReturnValueOnsuccessthetotalnumberofacterswrittenisreturned.Onfailureanegativenumberisreturned.Example123456789101112printfexample#includeintma
10、in()printf(“acters:%c%cn“a65)printf(“Decimals:%d%ldn“1977650000L)printf(“Precedingwithblanks:%10dn“1977)printf(“Precedingwithzeros:%010dn“1977)printf(“Somedifferentradixes:%d%x%o%#x%#on“100100100100100)printf(“floats:%4.
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 眾賞文庫僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- stm32 printf重定向
- the relation and distinction between real variable function and complex function
- function_fread
- function_scanf
- function_rand
- function_realloc
- 5-3function
- 1-3function
- 3-8function
- 離散數(shù)學(xué)課件----function
- robot visual design with the panorama synthesis function
- a brief probe into the function of context and the principles of legal conversation
- second order discriminant function for amplitude comparison monopulse
- discussion on the application of computer prediction function to marketing management
- 2018版-microrna regulatory network structure and function
- brief analysis on weakening of social mobility function of rural
- study on the function application of enterprise information management system
- An Analysis of Pragmatic Function of Vagueness in Desperate Housewives.pdf
- 2016版-sperm acrosome biogenesis and function during fertilization
- 8-paper-temperature stability in coating pots as a function
評論
0/150
提交評論