c语言用法
文章平均质量分 79
ychongx
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
指针函数用法,参考u-boot1.1.6
function_pointer.ccc function_pointer.c原创 2014-04-29 18:17:28 · 4326 阅读 · 0 评论 -
linux内核结构体初始化时出现的.owner = THIS_MODULE
.owner = THIS_MODULE为什么加“点”的原因多次看书、编程时又看到了对结构体这种定义的方法,如: struct file_operations scull_fops = { .owner = THIS_MODULE, .llseek = scull_llseek, .read = scull_read, .write = scull_write, .转载 2014-06-04 17:06:11 · 1103 阅读 · 1 评论 -
返回值问题及goto问题
hello.c:#includeint printchar(void){ printf("aa\n");}int main(){ int ret=0; ret = printchar(); printf("ret = %d\n", ret); return 0;}cc hello.c.原创 2014-06-06 01:59:32 · 1309 阅读 · 0 评论 -
结构体初始化
结构#includestruct stu { int num; char *name; int age;};static struct stu stu1 ={ .num = 1001, .age = 18, };int main(){ printf("sizeof(stu1)原创 2014-06-18 16:37:09 · 1179 阅读 · 0 评论 -
__attribute__((packed))详解
1. __attribute__ ((packed)) 的作用就是告诉编译器取消结构在编译过程中的优化对齐,按照实际占用字节数进行对齐,是GCC特有的语法。这个功能是跟操作系统没关系,跟编译器有关,gcc编译器不是紧凑模式的,我在windows下,用vc的编译器也不是紧凑的,用tc的编译器就是紧凑的。例如:在TC下:struct my{ char ch; int a;} sizeof(in转载 2014-06-26 17:42:47 · 602 阅读 · 0 评论 -
可变函数定义及使用
关键词:原创 2014-05-27 16:50:52 · 645 阅读 · 0 评论
分享