360doc--燒包谷free的文章 http://www.ahfyzs.com/rssperson/13337566.aspx 360doc (http://www.ahfyzs.com) zh-cn 360doc--個(gè)人圖書館 比較字符串的前n個(gè)字符是否相同 http://www.ahfyzs.com/content/13/0913/11/13337566_314150129.shtml 2013/9/13 11:45:29
字符串的比較 http://www.ahfyzs.com/content/13/0913/11/13337566_314139453.shtml 2013/9/13 11:04:39
字符串的比較(庫函數(shù)) http://www.ahfyzs.com/content/13/0913/10/13337566_314137611.shtml 2013/9/13 10:57:58
在字符串刪除指定字符 http://www.ahfyzs.com/content/13/0913/10/13337566_314135306.shtml 2013/9/13 10:49:43
在字符串中指定位置前插入指定字符 http://www.ahfyzs.com/content/13/0913/10/13337566_314130953.shtml 2013/9/13 10:33:50
查找兩個(gè)字符串中相同的字符(使用庫函數(shù)) http://www.ahfyzs.com/content/13/0913/10/13337566_314127029.shtml 2013/9/13 10:18:03
查找兩個(gè)字符串中相同的字符 http://www.ahfyzs.com/content/13/0913/10/13337566_314125976.shtml 2013/9/13 10:13:54
字符串查找 http://www.ahfyzs.com/content/13/0913/09/13337566_314122159.shtml 2013/9/13 9:57:37
字符串連接 http://www.ahfyzs.com/content/13/0913/01/13337566_314083246.shtml 2013/9/13 1:13:19
字符串刪除(指定長度和位置) http://www.ahfyzs.com/content/13/0913/01/13337566_314082805.shtml 2013/9/13 1:05:22
字符串復(fù)制 http://www.ahfyzs.com/content/13/0913/00/13337566_314081871.shtml 2013/9/13 0:50:30
字符串復(fù)制#include "stdio.h"#include "string.h"void main(){char s1[50],s2[50];int i;printf("Input the S1 :");gets(s1);//for(i=0;s1[i]!=''\0'';i++)//s2[i]=s1[i];//s2[i]=''\0'';strcpy(s2,s1);//strcpy(s2,&s1[5]);printf("The copy S1 :");puts(s2);}
C中內(nèi)存建立與釋放的函數(shù) http://www.ahfyzs.com/content/13/0806/20/13337566_305207067.shtml 2013/8/6 20:28:02
C中內(nèi)存建立與釋放的函數(shù)。void *malloc(long NumBytes):該函數(shù)分配了NumBytes個(gè)字節(jié),并返回了指向這塊內(nèi)存的指針。其實(shí)這兩個(gè)函數(shù)用起來倒不是很難,也就是malloc()之后覺得用夠了就甩了它把它給free()了,舉個(gè)簡單例子: // The Code... char *Ptr = NULL; Ptr = (char *)malloc(100 * sizeof(char)); if (NULL == Ptr) { exit (1); } gets(Ptr);
C語言中字符串操作——字符串的連接 http://www.ahfyzs.com/content/13/0806/20/13337566_305206409.shtml 2013/8/6 20:24:43
C語言中字符串操作——判斷是否為回文數(shù) http://www.ahfyzs.com/content/13/0806/20/13337566_305205912.shtml 2013/8/6 20:22:07
C語言中字符串的查找 http://www.ahfyzs.com/content/13/0806/20/13337566_305204724.shtml 2013/8/6 20:16:20
C語言中常用的查找方法2---折半查找法 http://www.ahfyzs.com/content/13/0804/11/13337566_304638864.shtml 2013/8/4 11:42:00
C語言中常用的查找方法1---順序查找法 http://www.ahfyzs.com/content/13/0804/11/13337566_304638653.shtml 2013/8/4 11:40:54
C語言中常用的排序方法2---選擇法 http://www.ahfyzs.com/content/13/0804/10/13337566_304629951.shtml 2013/8/4 10:59:48
C語言中常用的排序方法1---冒泡法 http://www.ahfyzs.com/content/13/0804/10/13337566_304629714.shtml 2013/8/4 10:58:51
C,C++隨機(jī)數(shù)產(chǎn)生 http://www.ahfyzs.com/content/13/0804/09/13337566_304615522.shtml 2013/8/4 9:53:29
3) 如果在調(diào)用rand()之前沒有調(diào)用過srand(seed),效果將和調(diào)用了srand(1)再調(diào)用rand()一樣(1也是一個(gè)定值)。最后,關(guān)于偽隨機(jī)浮點(diǎn)數(shù):用rand() / double(RAND_MAX)可以取得0~1之間的浮點(diǎn)數(shù)(注意,不同于整型時(shí)候的公式,是除以,不是求模),舉例:double ran_numf=0.0;srand((unsigned)time(0));for(int i=0;i<10;i++){ran_numf = rand() / (double)(RAND_MAX);cout<<ran_numf<<" ";}運(yùn)行結(jié)果為:0.716636,0.457725,…