![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C语言
发呆的小球童
学习,为了更好的生活
展开
-
获取字符格式的当前时间
#include <stdio.h>#include <time.h>#include <string.h>int main (){¦ time_t timer;¦ struct tm *Now;¦ char DateStr[40];¦ time( &timer );¦ Now = localtime( &timer );¦ memset(DateStr, 0, 40);¦ strftime(DateS原创 2021-11-10 16:50:40 · 93 阅读 · 0 评论 -
通用型冒泡、选择、插入、希尔、快速排序的代码实现
通用型冒泡、选择、插入、希尔、快速排序的代码实现/************************************************************************* > File Name: sort.c > Author: xxx > Mail: xxx.com > Created Time: *******************************************************************原创 2021-05-17 23:35:54 · 105 阅读 · 0 评论 -
理解补码的要点
补码是什么?作用简化CPU的运算,方便计算机内部用加法器(ALU)实现负数的计算。在寄存器中以补码的形式存储表示方法正数的补码即其本身;负数的补码:其反码的基础上加1取值范围:-128~127 对应(0x80~0x7f)举例:-1-2 =(-1)+(-2)= (0X11111111)补 +(0X11111110)补 = (0X11111101 )补 = (0X11111100)反 = (0X10000011)原 = -3...原创 2020-12-06 23:43:02 · 161 阅读 · 0 评论