- 博客(9)
- 资源 (1)
- 收藏
- 关注
原创 alig even
#include using namespace std;int addr_align(int addr, int len){if (len & len - 1) return -1;return len % addr == 0 ? len : (addr / len + 1) * len;}int main(){coutreturn 0;
2012-03-30 14:02:39 244
原创 const的重要性
#include using namespace std;int SumOfOne(unsigned char *px, int len){int ecx = 0;for (int inx=0; inx!=len; ++inx)while (px[inx]!=0) px[inx] &= px[inx] - 1, ++ecx;return ecx;}
2012-03-30 13:39:36 240
原创 sumofone
int SumOfOne(unsigned char *px, int len){int count = 0;for (int inx=0; inx!=len; ++inx)while (px[inx]) px[inx] &= px[inx] - 1, ++count;return count;}
2012-03-30 12:12:43 159
原创 243
#include #include using namespace std;void print_binary(int v){int size = sizeof (int) * 8;while (size--){if ((v & 1else cout}cout}int main(){srand(time(NULL));int x =
2012-03-28 21:33:41 210
原创 what is mod ?
int main(){int a[1000];int i;for (i=0; i{a[i] = -1 -i;}printf("%d\n", strlen(a));return 0;}what is the result ?
2012-03-28 20:10:21 207
原创 declaration and definition ?
memory allocate declaration: 已定义,例如extern 或者是用于占位,函数原型。
2012-03-28 19:56:10 310
原创 endian
1、what is the address of a multiple data? the smallest 0 1 2 3 4 5 6 7 8 0 1 2 3 4 5 6 7 8 ----------------------------------------------------------------------------------------------
2012-03-28 19:54:07 223
原创 hello world
----------->coding --------->c ---->cpp----------->cc----------->as------>ld ------------->elf loader------------>networkit's easy!1、c hello world 1 #include 2 int main() 3 { 4
2012-03-28 10:42:37 188
gun glibc gblic gun c函数库 c库源码 glibc
2012-05-29
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人