![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Things about C
文章平均质量分 82
瑜陀
Sophomore, major in Computer Science.
展开
-
C语言实现删除匹配的某一行文本
在处理文本文件需要对某行文本进行查询、修改、删除操作,本文采用了创建中间缓冲文件`buff.txt`的思想对这一删除操作进行实现。原创 2023-02-24 11:48:44 · 2730 阅读 · 1 评论 -
C语言指针——从入门到精通
这是一个很简单的例子,程序中创建了两个局部变量,然后利用指针输出它们的地址。其中`&`是取地址符,取出来以后赋给两个指针变量p1、p2,并将其打印出来。细心的话可以发现这两个地址由大到小,相差为 4。这说明栈中的这两个变量恰好相邻,且一个` int `类型的变量占用 4B大小空间。而且还说明栈空间的增长方向是由大到小的,当然我们的主题是指针,这里不再赘述。原创 2023-01-17 23:40:06 · 422 阅读 · 0 评论 -
Analysis of the Location of Initialized/Uninitialized Global/Static/Local Variables/Constants in Mem
But strictly speaking, the bss segment still occupies some executable file space. For example, there is a description of the bss segment in the segment table, and a description of related variables in the bss segment in the symbol table, but here is not th原创 2023-01-10 00:47:29 · 129 阅读 · 0 评论 -
About the problem of struct structure assignment
Obviously, t1 and t2 point to the same memory unit. At this time, if the content pointed to by t1 is changed, t2 will change accordingly. Therefore, this copy is just a simple assignment of the literal value, so this copy is a shallow copy .原创 2022-11-29 21:26:49 · 129 阅读 · 0 评论