C语言探赜索隐
文章平均质量分 62
gszllyj
这个作者很懒,什么都没留下…
展开
-
memcpy函数的实现
前段时间去面试自己比较喜欢的一个工作,面试的哥们让我实现void *memcpy(void *to, const void *from, size_t count)这个函数。没做出来,挂了。感到非常不爽。回来研究了一下。找着了几个不同版的实现,贴出来。首先对这个函数做一些说明。#include void *memcpy(void *to, const void *from, size原创 2007-05-27 20:32:00 · 6923 阅读 · 4 评论 -
strcpy函数的实现
函数原型:#include char *strcpy(char *str1, const char*str2)函数strcpy()把str2的内容拷贝到str1。str2必须是终止符为null字串的指针,strcpy()返回指针给str1。如果str1和str2重叠,则strcpy()的特性无定义。linux的实现:char *strcpy(char *dest, cons原创 2007-05-27 21:07:00 · 2084 阅读 · 0 评论 -
const关键字
The const keyword.The const keyword is used to create a read only variable. Once initialised, the value of the variable cannot be changed but can be used just like any other variable.const synta转载 2007-05-29 11:29:00 · 890 阅读 · 0 评论