![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C/C++
LonelyKaren
这个作者很懒,什么都没留下…
展开
-
反转字符串
#include<stdio.h> #include<string.h> #include<malloc.h> char *ReverseString(char *s,int length){ int i=0; int j=length-1; char tmp; if(s==NULL||length==0) return NULL; while(i<j)...原创 2015-11-05 16:43:13 · 294 阅读 · 0 评论 -
struct、union、字节对其、大端小端存储总结
一、struct&union 待补充 二、字节对其规则:(摘自http://blog.csdn.net/hairetz/article/details/4084088) 1:数据成员对齐规则:结构(struct)(或联合(union))的数据成员,第一个数据成员放在offset为0的地方,以后每个数据成员存储的起始位置要从该成员大小或者成员的子成员大小(只要该成员有子成员,比如说是数组,原创 2015-11-05 17:37:28 · 826 阅读 · 0 评论