uTools-Manuals/docs/c/itoa.html
2019-04-21 11:50:48 +08:00

35 lines
674 B
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<h1>标准库函数 - itoa</h1>
<p>原型extern char *itoa(int i);</p>
<p>用法:#include &lt;stdlib.h></p>
<p>功能把整数i转换成字符串</p>
<p>说明:返回指向转换后的字符串的指针</p>
举例:<pre><code class="language-c">
// itoa.c
#include &lt;syslib.h>
#include &lt;stdlib.h>
main()
{
int i=7412;
clrscr(); // clear screen
textmode(0x00);
printf("%d",i);
printf("%s",itoa(i));
getchar();
return 0;
}
</code></pre>相关函数:无