![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C语言
雾里赏花
这个作者很懒,什么都没留下…
展开
-
[C语言]memcmp函数返回值讨论
函数原型int memcmp(const void *buf1, const void *buf2, size_t n));参数buf1 -- 指向内存块的指针。buf2 -- 指向内存块的指针。n -- 要被比较的字节数。功能比较内存区域buf1和buf2的前count个字节。头文件#include <string.h>或#include<memory.h>返回值如果返回值 < 0,则表示 buf1 小于 buf2。如果返回值 > 0,原创 2021-01-06 11:32:01 · 4588 阅读 · 2 评论 -
[C语言]C语言实现栈(基于单向链表)
#include <stdio.h>#include <stdlib.h>typedef int DataType;typedef struct node{ DataType data; struct node *next; }StackElement;typedef struct Stack_t{ int size; St...原创 2020-03-09 16:55:56 · 253 阅读 · 0 评论 -
[C语言]string与Hex的相互转换
由于很多时候,串口通信的协议可能是字符数组构成的,每一个字节都表示一种信息,在调试的时候,将它们输出显示,就需要将hex型式的字符数组转换成便于显示的string字符串,现总结出该函数,仅供参考。/*************************************************Function: hex2stringDescription: hex字符数组转换成str...原创 2020-02-27 11:26:07 · 22689 阅读 · 3 评论