上一页 1 ··· 5 6 7 8 9
摘要: printf语句中包含'\0'字符的处理1 #include 2 3 int main (void)4 {5 printf("helloxx\0xxworld\n");6 printf("\n------------\n");7 printf("hello%sworld\n"... 阅读全文
posted @ 2014-08-08 00:03 挨踢淫才 阅读(1602) 评论(0) 推荐(0) 编辑
摘要: 掩码10110101&11111100101101XX打开第三位10110101|0010000010110101关闭第三位10110101&1101111110010101转置前4位10110101^1111000001000101查看一位的值if ((flag & MASK) == MASK)=... 阅读全文
posted @ 2014-07-30 14:03 挨踢淫才 阅读(362) 评论(0) 推荐(0) 编辑
摘要: 按结构体字段进行排序#include#includeint compare(void *, void *, int (*)(void *, void *));int orderById(void *, void *);int orderByName(void *, void *);int order... 阅读全文
posted @ 2014-07-29 14:33 挨踢淫才 阅读(508) 评论(0) 推荐(0) 编辑
摘要: 函数 1 #include 2 3 int add(int, int); 4 5 int main(void) 6 { 7 printf("%d\n", add(3, 4)); 8 printf("%d\n", (&add)(3, 4)); 9 printf("%d\n"... 阅读全文
posted @ 2014-07-28 16:58 挨踢淫才 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 001.删除不以特定字符串结尾的文件1.) rm -f `ls | grep -v '\.c$'`(删除所有的非c源文件: ls前面" ' "为反向引号, 键盘1前面的键; "." 需要转义) 阅读全文
posted @ 2014-07-21 16:01 挨踢淫才 阅读(297) 评论(0) 推荐(0) 编辑
摘要: 001. 设置TAB键替换4空格1.) set ts(tabstop)=42.) set expandtab(noexpandtab: 则为4空格替换TAB键) 阅读全文
posted @ 2014-07-21 15:11 挨踢淫才 阅读(104) 评论(0) 推荐(0) 编辑
摘要: function getDaysInMonth(year, month){ var date = new Date(year, month, 0); return date.getDate(); }new Date()参数中的month范围为0-11,如果希望把月设置为 8 月,... 阅读全文
posted @ 2013-09-27 16:53 挨踢淫才 阅读(225) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9