请输入您要查询的百科知识:

 

词条 bcopy
释义

原型:extern void bcopy(const void *src, void *dest, int n);

用法:#include <string.h>

功能:将字符串src的前n个字节复制到dest中

说明:bcopy不检查字符串中的空字节NULL,函数没有返回值。

举例:

// bcopy.c

#include <syslib.h>

#include <string.h>

main()

{

char *s="Golden Global View";

char d[20];

clrscr(); // clear screen

bcopy(s,d,6);

printf("s: %s\",s);

printf("d: %s\",d);

getchar();

clrscr();

s[13]=0;

bcopy(s+7,d,11); // bcopy ignore null in string

printf("%s\",s+7);

for(i=0;i<11;i++)

putchar(d);

getchar();

return 0;

}

随便看

 

百科全书收录4421916条中文百科知识,基本涵盖了大多数领域的百科知识,是一部内容开放、自由的电子版百科全书。

 

Copyright © 2004-2023 Cnenc.net All Rights Reserved
更新时间:2025/2/25 7:35:01