![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C program design
zhuyeyiyi
这个作者很懒,什么都没留下…
展开
-
About the Pointer - 1
关于C语言中的指针问题,无数次都感觉自己已经OK了,其实每一次碰见都感觉有陌生的地方,可能是个人对知识没有深入理解造成的。有预感这会是一个很长的系列: 最近在看Computer Systems: A Programer's Perspective,在强制类型转换中有一段代码,涉及到指针强转,数据类型定义,指针常量和常量指针等较为混淆的概念: #include #include ty原创 2013-07-13 10:45:47 · 471 阅读 · 0 评论 -
Difference between string created by array and pointer
char *getstring() { int size = 4; char *string=malloc(sizeof(char)*size; string[0] = 'H'; string[1] = 'i'; string[2] = '!'; string[3] = '\0'; return string; } int main() { printf("%s\n",getstri原创 2013-07-17 21:13:19 · 579 阅读 · 0 评论 -
关于“火柴棍式”程序员面试题
文章参考自陈大大的博客“火柴棍式”程序员面试题, 下面是一个C程序,想要输出20个减号,粗心的程序员把代码写错了,你需要修改一下的代码,但是你只能添加或修改其中的一个字符,请给出三种方案: int n = 20; for(int i = 0; i < n; i--) { printf("-"); } 不要以为这题不是很难,我相信你并不那么容易能找到3种方法。我觉得,如果你转载 2013-07-18 20:05:25 · 702 阅读 · 0 评论