![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
函数本质
Billy12138
i am billy
展开
-
函数的执行过程-栈帧的创建与销毁
众所周知变,在我们编写代码时函数的一些优点使我们会频繁的使用函数,那么函数执行的过程到底是怎样实现的呢? 我们以一个简单的函数加法函数为例: 代码如下: #define _CRT_SECURE_NO_WARNINGS #include int add(int x, int y) { int z = 0; z = x+y; return z; } int main() { int a原创 2017-05-28 21:20:13 · 599 阅读 · 0 评论 -
c语言中部分限制字符函数的实现strncmp,strncat,strncpy,strstr,strrstr
1、带限制的字符串比较函数的实现 #include int my_strncmp(char *p, char *q, int n) { int count = 0; while ((*p == *q)&&(count < n)) { *p++; *q++; count++; } if (*p == *q) { return 0; } e原创 2017-07-29 00:56:46 · 441 阅读 · 0 评论