mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2026-03-03 03:20:41 +08:00
0.0.1
This commit is contained in:
41
docs/c/bzero.html
Normal file
41
docs/c/bzero.html
Normal file
@@ -0,0 +1,41 @@
|
||||
<h1>字符串函数 - bzero</h1>
|
||||
|
||||
|
||||
<p>原型:extern void bzero(void *s, int n);</p>
|
||||
|
||||
<p>用法:#include <string.h></p>
|
||||
|
||||
<p>功能:置字节字符串s的前n个字节为零。</p>
|
||||
|
||||
<p>说明:bzero无返回值。</p>
|
||||
|
||||
举例:<pre>
|
||||
|
||||
// bzero.c
|
||||
|
||||
#include <syslib.h>
|
||||
#include <string.h>
|
||||
|
||||
main()
|
||||
{
|
||||
struct
|
||||
{
|
||||
int a;
|
||||
char s[5];
|
||||
float f;
|
||||
} tt;
|
||||
|
||||
char s[20];
|
||||
|
||||
bzero(&tt,sizeof(tt)); // struct initialization to zero
|
||||
bzero(s,20);
|
||||
|
||||
clrscr();
|
||||
printf("Initail Success");
|
||||
|
||||
getchar();
|
||||
return 0;
|
||||
}
|
||||
|
||||
</pre>相关函数:<a href="bcmp.html">bcmp</a>,<a href="bcopy.html">bcopy</a>
|
||||
|
||||
Reference in New Issue
Block a user