会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
求知
2010年7月29日
内存对齐
摘要: 首先看一个简单的程序:#include<stdio.h>void main(){ struct inner { char c1; double d; // char c2; }; printf("the size of struct inner is :%d\n",sizeof(struct inner));}在Ubuntu10.04下用gcc编译输出结果为:the size of s...
阅读全文
posted @ 2010-07-29 19:31 生活费
阅读(222)
评论(0)
推荐(0)
编辑
几个小程序
摘要: 1、递归实现字符串的逆序打印#include<stdio.h>#include<string.h>void reserve(char *p){ if(*p=='\0')return; reserve(p+1); printf("%c",*p);}void main(){ char a[10]="abc"; reserve(a); printf("\n");}2、A,B,C,...
阅读全文
posted @ 2010-07-29 13:54 生活费
阅读(413)
评论(0)
推荐(0)
编辑
导航
博客园
首页
新随笔
联系
订阅
管理
公告