![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C语言
真的不想写程序了
这个作者很懒,什么都没留下…
展开
-
三个数取中间值
三个数找中间的数原创 2023-01-05 14:04:52 · 416 阅读 · 0 评论 -
联合体 结构体位域
联合结构体,位和字节的关系原创 2023-01-04 18:14:32 · 140 阅读 · 0 评论 -
滑动平均法
滑动平均滤波法原创 2022-03-29 10:36:17 · 271 阅读 · 0 评论 -
结构体初值为0
#include "stdio.h"#include "string.h"#include "math.h"typedef struct{ unsigned char a; unsigned char b; unsigned char c; unsigned char d; unsigned char e; unsigned char f;}TT;TT acc[7]={ {0}, {1,2,3,4,5}, {2,3,4,4,0}, {3,4,5,0,9,0}, {4,原创 2021-09-07 10:11:28 · 697 阅读 · 0 评论 -
数组元素负数情况
#include "stdio.h"#include "string.h"#include "math.h"int main( void ){ unsigned int a[5] = {0,1,2,3,4}; unsigned int* p; p = &a[4]; printf("%d\n",p[-1]); printf("%d\n",(&a[4])[-2]); return 0;}结果:原创 2021-09-07 09:56:54 · 613 阅读 · 0 评论 -
keil中.sct文件warning
; *************************************************************; *** Scatter-Loading Description File generated by uVision ***; *************************************************************LR_IROM1 0x08000000 0x00200000 ; load region size_region{ E原创 2021-06-25 09:35:17 · 550 阅读 · 0 评论 -
const指针
const int p; // p is a int const. p是一个int型常量const int *p; // p is a point to int const. p是一个指针,指向int型常量。即p是一个指向int型常量的指针。int const *p; // 与上相同 const int 和 int const 是一样的意思。《C++ primer》中采用第一种写法。int * const p; // p is a const point to int. p是一个指向i原创 2021-06-17 16:35:38 · 45 阅读 · 0 评论 -
sizeof()和strlen()
#include "stdio.h"#include "string.h"#include "math.h"int main( void ){ char Strings[] = {"Hello"}; char *p = Strings; unsigned int a; unsigned int b; unsigned int c; unsigned int d; a = sizeof(Strings); b = strlen(Strings); c = sizeof(p);原创 2021-06-17 14:33:20 · 57 阅读 · 0 评论