- 博客(8)
- 资源 (44)
- 收藏
- 关注
原创 位的计算
#include #include struct stFlag{unsigned char first: 1;unsigned char second: 1;unsigned char third: 6;};int main(){stFlag f;f.first = 0;f.second = 0;f.third = 0x0f;
2012-11-24 00:24:35 452
转载 数据及相应存储区
这是一个前辈写的,非常详细 //main.cpp int a = 0; 全局初始化区 char *p1; 全局未初始化区 main() { int b; 栈 char s[] = "abc"; 栈 char *p2; 栈 char *p3 = "123456"; 123456\0在常量区,p3在栈上。 static int c =0; 全局(静态)初始化区 p1 = (cha
2012-11-15 23:58:42 782
转载 野指针
昨天在写完一个函数后,因里面用了很多指针操作, 写完后就回过头来检查,结果发现了一个”野指针”, 另我非常奇怪的是,这个”野指针”被我再次使用,程序运行居然没有问题.就是这个疑问, 引发了我写这篇文章.先说说什么是“野指针“。首先”野指针”的概念只会出现在像C和C++这种没有自动内存垃圾回收功能的高级语言中, 所以java或c#肯定不会有野指针的概念. 当我
2012-11-15 23:45:24 12085 2
转载 C语言中printf格式化输出函数
用 法 int printf(const char *format,[argument]); format 参数输出的格式,定义格式为: %[flags][width][.perc] [F|N|h|l]type 规定数据输出方式,具体如下: 1.type 含义如下: d 有符号10进制整数 i 有符号10进制整数 o
2012-11-14 00:03:39 996
原创 结构体中成员变量偏移量
#include struct student{int a;int d;int b;int c;}; int main() { printf("%d\n", &(((struct student *)0)->b));printf("%d\n", ((unsigned int)(p) - ((unsigned int)&(p->b
2012-11-11 00:13:32 549
原创 链表的创建和打印
#include #include int n = 0;struct student{int num; student *next;};student *create(){student *head, *p1, *p2;p1 = (student *)malloc(sizeof(student)); p2
2012-11-09 00:19:00 514
转载 指向函数的指针
#include float max(float x, float y){return x > y ? x : y;}int main(){float a = 1.1, b = 2.2;float (*p)(float x, float y);p = max;printf("%f\n", (*p)(a, b));return 0;
2012-11-07 23:01:47 468
转载 strlen与sizeof区别(转载)
#include "stdio.h"#include "string.h"void main(){char aa[10];printf("%d",strlen(aa));printf("%d",sizeof(aa));}程序运行得到结果是strlen(aa)=15.sizeof(aa)=10;这是怎么回事呢?strlen是有效字符串的长度,不包含‘\0’,与初始化有
2012-11-07 22:40:21 420
chatserverclientepoll
2018-08-04
类everything java源码
2018-06-13
Orange's chapter8a修改后可以查看消息流程的版本
2018-04-05
chapter5_i
2018-03-13
clicks模拟鼠标键盘
2016-03-13
[97世界编程大赛4K组]ts代码运行展示.mp4
2024-05-05
dmesg_with_pr_info_add_file_function.log
2019-11-03
kernel start log.txt with log
2019-10-29
boot.zip Linux kerner grub 5.0.1压缩包
2019-09-14
30day 的07_day 添加了大屏显示1024*768,适配了中文显示
2019-04-14
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人