11 2020 档案
摘要:#C++-Code-Time Transfer-Windows FILETIME(1601) To 1970 UTC November 28, 2020 4:56 PM 最近遇到需要进行时间转换的实现。 以下是从mongoose.c中截取的,与之后在网上找到的思路是一致的。 Function dou
阅读全文
摘要:Tool-git-command-入门笔记[慕课网-五月的夏天] November 26, 2020 11:45 PM 1.github新建一个仓库,名称"TestGit" create a new repository on the command line echo "# TestGit" >>
阅读全文
摘要:#C-当表达式中同时存在有符号和无符号的类型时,有符号类型先转为无符号参与计算 November 14, 2020 7:40 PM 今天看CPrimer时发现: /*当表达式中同时存在有符号和无符号的类型时,有符号类型先转为无符号参与计算*/ unsigned int un1 = 1; int n2
阅读全文
摘要:#C语言-C语言程序设计-Practice code 书上第一章的几个练习。 关于直方图有点头疼,之后再仔细研究一下。 /*1-8 统计空格、制表符、换行符个数*/ int c; int nl = 0; int nt = 0; int nb = 0; while((c = getchar()) !=
阅读全文
摘要:#C语言-C语言程序设计-Function-strcpy 书上关于strcpy介绍了数组、指针、指针简化的例子,对于代码简化是个可见的例子,记录下来。 #include <stdio.h> #include <stdlib.h> int main() { //initial value char c
阅读全文
摘要:#C语言-C语言程序设计-Function-fopen 直接抄的书上的,编译没过,应该和系统有关,用的windows系统去编译unix上的函数。 就功能理解上还是可以的,所以没有在去linux上重新编译。 #include <stdio.h> #include <stdlib.h> #include
阅读全文
摘要:#C语言-C语言程序设计-Application-逆波兰计算器 最近软考的时候才知道的逆波兰表达式,这个竟然是C的内容之一,把书上的抄下来了。 主要就是对操作数的入栈出栈,以及与操作符匹配的一种应用方式。 #include <stdio.h> #include <stdlib.h> /* 为了使用a
阅读全文
摘要:#C语言-C语言程序设计-Function-Find 照着书敲了一遍然后又重新读了一次才发现程序通过while循环识别的 -xn这种输入。 #include <stdio.h> #include <stdlib.h> #include <string.h> #define MAXLINE 1000
阅读全文
摘要:#希尔排序-C语言 2020.11月软考时考了希尔排序,但是目前我还是没想明白他的那个if要填什么。。。。。 下面是今天重新看的 《C程序设计语言》书上的例子,这个和之前理解的希尔就没有什么出入了。 void shellSort(int v[], int n){ int gap, i, j, tem
阅读全文