![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C语言学习
rookie_lzy
这个作者很懒,什么都没留下…
展开
-
const 注意点(C)
在阅读完CPP 5th后,看了关于const的介绍,写下这篇文章增强理解。 关于保护数组内容: 对形式参量使用const原创 2015-03-15 15:44:19 · 311 阅读 · 0 评论 -
C & Prime
//Compute and print all the prime numbers from 1 to 100 #include int main(void) { int number; int divisor; //print one two printf("1 2 "); // No other even numbers are prime;look at the rema转载 2015-03-26 00:52:38 · 468 阅读 · 0 评论 -
我在Pointers on C 的错误点——1
//Pointers on C programming practise 4.4//this is my code#include #include void copy_n ( char dst[], char src[], int n ); void copy_n ( char dst[], char src[], int n ){ int m = strlen(src); if( m原创 2015-03-26 09:58:14 · 278 阅读 · 0 评论 -
我在Pointers on C 的错误点——2
Eratosthenes 筛选法是一种计算质数的有效方法。这个算法的第一步就是写下所有从2至某个上限之间的所有整数。在算法的剩余部分,遍历整个列表并剔除所有不是质数的整数。 后面的步骤是这样的。找到列表中的第一个不被剔除的数(也就是2),然后将列表后面逢双的数都剔除。接着,在回到列表的头部重新开始,此时列表中尚未被剔除的第一个数就是3。。。。。/*Sieve of Eratosthenes --原创 2015-03-28 11:48:25 · 312 阅读 · 0 评论