yyyyyyyyyyyyyyyyyyyy

博客园 首页 新随笔 联系 订阅 管理
上一页 1 ··· 354 355 356 357 358 359 360 361 362 ··· 367 下一页

2014年11月12日 #

摘要: #include #include #include #include void flush(FILE *stream);int main(void){ FILE *stream; char msg[] = "This is a test"; /* create a file */... 阅读全文
posted @ 2014-11-12 02:54 xxxxxxxx1x2xxxxxxx 阅读(417) 评论(0) 推荐(0)

摘要: #include#includeint main(int argc,char *argv[]) { int ch; opterr=0; while((ch=getopt(argc,argv,"a:b:c:d:e:"))!=-1) { printf("\n\n\n"); ... 阅读全文
posted @ 2014-11-12 02:51 xxxxxxxx1x2xxxxxxx 阅读(202) 评论(0) 推荐(0)

摘要: #include #include #include int main(void){ time_t timer;//time_t就是long int 类型 struct tm *tblock; //time()获取当前的系统时间,返回的结果是一个time_t类型,其实就是一个大整数... 阅读全文
posted @ 2014-11-12 02:50 xxxxxxxx1x2xxxxxxx 阅读(196) 评论(0) 推荐(0)

摘要: #include #include #include #include #include #include #include #include #include #include #define SERVER_PORT 8888 #define MAX_BUF_SIZE 1024 void udpc... 阅读全文
posted @ 2014-11-12 02:48 xxxxxxxx1x2xxxxxxx 阅读(371) 评论(0) 推荐(0)

摘要: #include #include #include #include #include #include #include #include #define portnumber 3333int main(int argc, char *argv[]) { int sock... 阅读全文
posted @ 2014-11-12 02:46 xxxxxxxx1x2xxxxxxx 阅读(313) 评论(0) 推荐(0)

摘要: typedef unsigned int size_t; void * my_memcpy ( void *dest, const void *src, size_t num ) { void* ret = dest; while (num--) { *... 阅读全文
posted @ 2014-11-12 02:44 xxxxxxxx1x2xxxxxxx 阅读(239) 评论(0) 推荐(0)

摘要: //将源字符串加const,表明其为输入参数char*strcat(char*strDest,constchar*strSrc){//后文returnaddress,故不能放在assert断言之后声明addresschar*address=strDest;assert((strDest!=NULL)... 阅读全文
posted @ 2014-11-12 02:40 xxxxxxxx1x2xxxxxxx 阅读(136) 评论(0) 推荐(0)

摘要: char* strchr(char*s,charc){while(*s!='\0'&&*s!=c){++s;}return*s==c?s:NULL;}// strchr.c查找字符串s中首次出现字符c的位置#include#includechar* my_strchr(const char *s1,... 阅读全文
posted @ 2014-11-12 02:38 xxxxxxxx1x2xxxxxxx 阅读(306) 评论(0) 推荐(0)

摘要: char * strdup(char *str) { char * strNew; assert(str != NULL); strNew = (char *)malloc(strlen(str)+1); strcpy(strNew,str); return strNew;} ... 阅读全文
posted @ 2014-11-12 02:36 xxxxxxxx1x2xxxxxxx 阅读(242) 评论(0) 推荐(0)

摘要: #include#includeint my_strlen(const char* strDest){ assert(NULL!=strDest); if('\0'==*strDest) return 0; else return(1+my_strlen... 阅读全文
posted @ 2014-11-12 02:35 xxxxxxxx1x2xxxxxxx 阅读(211) 评论(0) 推荐(0)

上一页 1 ··· 354 355 356 357 358 359 360 361 362 ··· 367 下一页