随笔分类 -  C语言

摘要:/* 目录: 一 插入排序 二 希尔排序 */ 一 插入排序 #include <iostream> using namespace std; void Print_Array(int* p, int nCount); void InsertionSort(int* p, int nCount) { 阅读全文
posted @ 2022-07-07 15:23 火焰马 阅读(21) 评论(0) 推荐(0)
摘要:/* 目录: 一 C原理 二 汇编原理 */ 一 C原理 void change(int** p2) { printf("p2 = 0x%x, *p2 = 0x%x\n", p2, *p2); printf("*p2 = 0x%x, *8p2 = %d\n", *p2, **p2); } int m 阅读全文
posted @ 2022-06-29 02:08 火焰马 阅读(43) 评论(0) 推荐(0)
摘要:压缩包: 链接 阅读全文
posted @ 2019-09-26 23:08 火焰马
摘要:问题 1 区别: null NULL 0 nullptr -1 2 区别及使用: ascii UNICODE utf8 3 int: 原码、反码、补码 4 float: 指数存储、小数存储 5 计算: 结构体对齐后大小 https://www.cnblogs.com/clover-toeic/p/3853132.html 6 预处理: typedef https://www.cnblogs.com 阅读全文
posted @ 2019-09-26 00:31 火焰马 阅读(206) 评论(0) 推荐(0)
摘要:/* 目录: 一 时间操作 二 磁盘读取 */ 一 时间操作 void ShowCurrentTime() { time_t tt; time(&tt); tm *time = localtime(&tt); char* ws[] = { "星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六", }; printf("%d/%d/%d (%s) %02d:% 阅读全文
posted @ 2019-09-26 00:26 火焰马 阅读(223) 评论(0) 推荐(0)
摘要:效果图 阅读全文
posted @ 2019-09-24 23:48 火焰马
摘要:#include "stdafx.h" #include <stdlib.h> #include <time.h> // 生成随机数 - 100到200 int main(int argc, char *argv[], char **envp) { srand((unsigned)time(NULL)); int nLoop = 0; while (nLoop < 20) { int i = 10 阅读全文
posted @ 2019-09-19 22:45 火焰马 阅读(180) 评论(0) 推荐(0)
摘要:一 两个参数 二 三个参数 说明: 第三个参数用来在程序运行时获取系统的环境变量,操作系统运行程序时通过envp 参数将系统环境变量传递给程序 阅读全文
posted @ 2019-09-19 22:31 火焰马 阅读(216) 评论(0) 推荐(0)
摘要:一 枚举 二 位段/位域 三 联合体 阅读全文
posted @ 2019-09-14 18:19 火焰马 阅读(233) 评论(0) 推荐(0)
摘要:一 常量指针 : const int *p 二 指针常量 : int * const p 三 指针常量 : int * const p 四 指向常量的指针常量 : const int * const p 阅读全文
posted @ 2019-09-14 16:08 火焰马 阅读(146) 评论(0) 推荐(0)
摘要:一 const赋值 二 const改值 三 应用 阅读全文
posted @ 2019-09-14 14:13 火焰马 阅读(134) 评论(0) 推荐(0)
摘要:一 #define和typdef 二 宏函数 阅读全文
posted @ 2019-09-14 11:24 火焰马 阅读(194) 评论(0) 推荐(0)
摘要:/* 目录: 一 冒泡排序 二 选择排序 */ 一 冒泡排序 void BubbleSort(int *p, int nCount) { int nOutLoop, nInLoop; nOutLoop = 0; // 外层循环 : 计数变量 while (nOutLoop < nCount - 1) 阅读全文
posted @ 2019-09-12 19:17 火焰马 阅读(192) 评论(0) 推荐(0)
摘要:一 #pragma once 二 typedef 三 #ifdef 阅读全文
posted @ 2019-09-11 20:02 火焰马 阅读(289) 评论(0) 推荐(0)
摘要:一: NULL本质 二: nullptr本质 阅读全文
posted @ 2019-09-11 19:37 火焰马 阅读(142) 评论(0) 推荐(0)
摘要:一: 编译器过程 二: 头文件作用 三: 头文件组织原则 四: 头文件包含原则 五: 测试代码 文件结构 阅读全文
posted @ 2019-09-08 22:43 火焰马 阅读(255) 评论(0) 推荐(0)
摘要:一 整数 二 浮点数 三 cpu频率 阅读全文
posted @ 2019-09-08 19:15 火焰马 阅读(267) 评论(0) 推荐(0)
摘要:/* 目录: 一 代码测试 二 汇编原理 三 仿写函数 */ 一 代码测试 int main() { int i = 3; int k = 0; int m = 0; k = ++i; printf("k = %d i = %d\n", k, i); m = i++; printf("m = %d i =... 阅读全文
posted @ 2019-09-08 12:00 火焰马 阅读(265) 评论(0) 推荐(0)
摘要:#define _CRT_SECURE_NO_WARNINGS #include "stdafx.h" int main() { FILE *pFile = fopen("c:\\test.txt", "w"); putc('x', pFile); fclose(pFile); return 0; } // vc : 打开文件函数 - fopen FILE *fopen( const char * 阅读全文
posted @ 2019-09-08 11:12 火焰马
摘要:/* 目录: 一 字符和字符串初始化空间 */ 一 字符和字符串初始化 int main() { char c = 'c'; char str[] = "str123456"; char *pStr = "pStr123456"; printf("%c", c); printf("%s", pStr); printf("... 阅读全文
posted @ 2019-09-07 12:39 火焰马 阅读(241) 评论(0) 推荐(0)