随笔分类 -  C语言学习

摘要:一:代码实现//大数据乘法运算#include #include #include int BigDataMul(char *num01, char *num02){ int res = 0, i = 0, j = 0; int length01 = 0, length02 = 0, totalle... 阅读全文
posted @ 2015-08-01 10:56 mingyueruya 阅读(344) 评论(0) 推荐(1)
摘要:/*dup和dup2都可用来复制一个现存的文件描述符,使两个文件描述符指向同一个file结构体。如果两个文件描述符指向同一个file结构体, File Status Flag和读写位置只保存一份在file结构体中,并且file结构体的引用计数是2。如果两次open同一文件得到两个文件描述符,则每个描... 阅读全文
posted @ 2015-06-16 10:56 mingyueruya 阅读(180) 评论(0) 推荐(0)
摘要:/*Ubuntu 14.04平台下* 利用多线程 mmap文件内存共享* 实现文件拷贝*//*more thread copy files* 默认情况下开启5个线程*/#include #include #include #include #include #include #include #i... 阅读全文
posted @ 2015-06-12 16:24 mingyueruya 阅读(552) 评论(0) 推荐(0)
摘要:/*Level tow point have three cache model*/#include #include int Print(char**pArr);int Print02(char**pArr,int num);int GetMem(char***thirdModel,int len... 阅读全文
posted @ 2015-03-30 21:04 mingyueruya 阅读(203) 评论(0) 推荐(0)
摘要:环境:vs2013语言:C语言时间:2015年3月10日功能:实现二进制文件的读写实例#define _CRT_SECURE_NO_WARNINGS#include #include #define FILENAME "d:/studentInfo"#define COUNT 5typedef st... 阅读全文
posted @ 2015-03-10 22:05 mingyueruya 阅读(326) 评论(0) 推荐(0)
摘要:上一篇 自己动手写字符串库函数 三(C语言)//重置void my_StrSet(string *des, const char ch){ if (!IsEmpty(des)) return; else { char* des1 = des->str; int desLen = my_Str... 阅读全文
posted @ 2015-01-20 23:03 mingyueruya 阅读(197) 评论(0) 推荐(0)
摘要://子串同母串比较 是否在母串中 第二种方法char* my_FindStr(char*des,const char*sour){ char*des1 = des - 1; char*sour1 = NULL; int desLen = strlen(des); int sourLen = str... 阅读全文
posted @ 2015-01-11 23:14 mingyueruya 阅读(161) 评论(0) 推荐(0)
摘要:接着上一篇的自己动手写字符串你库函数 一(C语言),接着往下面写//具体实现 string.c//追加字符void Append_Char(string*strs, const char ch){ if (IsEmpty(strs) != 0 && ch != NULL) { int strLen... 阅读全文
posted @ 2015-01-05 22:46 mingyueruya 阅读(168) 评论(0) 推荐(0)
摘要:在coding中最常使用的就是对于字符串的处理问题,接下来我们自己动手写库函数,尽量使用指针操作,而不是数组操作//头文件 string.h#include #include //字符串结构体typedef struct CString{ char* str; int len;}string;//初... 阅读全文
posted @ 2015-01-01 12:29 mingyueruya 阅读(160) 评论(0) 推荐(0)