摘要: http://blog.sina.com.cn/s/blog_6ab0b9a80101awzr.html不同体系的CPU在内存中的数据存储往往存在着差异。例如,Intel的x86系列处理器将低序字节存储在起始地址,而一些RISC架构的处理器,如IBM的370主机使用的PowerPC或Motorola公司生产的CPU,都将高序字节存储在起始位置。这两种不同的存储方式被称为little-endian和big-endian。little-endian是x86系列CPU的数据存储方式,即将低序的部分存储在前面。而big-endian是将高序部分存储在前面。例如,要存储0xF432,little-end 阅读全文
posted @ 2013-10-30 22:28 夜雨阑珊 阅读(4358) 评论(0) 推荐(0) 编辑
摘要: #include#include#include#includestruct link{ int data; struct link *next;};void delMiddle(link *head){ if(head == NULL) return; else if(head->next == NULL) { delete head; return; } else { link *low = head; link *fast = hea... 阅读全文
posted @ 2013-10-30 21:42 夜雨阑珊 阅读(324) 评论(0) 推荐(0) 编辑
摘要: #includeint max(int a,int b){ return (a>b?a:b);}int findBiggestSum(int *B,int k){ int m=0,n;//m存储:到B[i[结束的最大子数组和 //n存储B[i]之前的最大数组和,可能包括B[i],也可能不包括 int i; n=B[0]; for(i=1;i<k;i++) { m=max(B[i],m+B[i]); n=max(n,m); } return n;}int main(){ int A[10]={2,4,-9,4,8,7,-3,-7,6,3}; int sum; sum=findBigg 阅读全文
posted @ 2013-10-30 21:18 夜雨阑珊 阅读(159) 评论(0) 推荐(0) 编辑