第7周 深入理解计算机系统(第二版) 例题2.3
2016-05-12 17:21
225 查看
问题及代码:
/*打印程序对象的字节表示*/ #include<stdio.h> typedef unsigned char *byte_pointer; /*使用强制类型转换来规避类型系统*/ void show_bytes(byte_pointer start,int len) //start是一个数组名 { int i; for(i=0;i<len;i++) printf(".2x",start[i]); printf("\n"); } void show_int(int x) { show_bytes((byte_pointer) &x,sizeof(int)); } void show_float(float x) { show_bytes((byte_pointer) &x,sizeof(float)); } void show_pointer(vodi *x) { show_bytes((byte_pointer) &x,sizeof(void *)); }
相关文章推荐
- httpurlconnection_vegetables(httpurlconnection请求方式获取菜谱)
- 发布mvc遇到的HTTP错误 403.14-Forbidden解决办法
- Httpclient_星座查询
- mysql事务和锁InnoDB(转自http://www.cnblogs.com/zhaoyl/p/4121010.html)
- 报错 Error:Could not install Gradle distribution from 'https://services.gradle.org/distributions/gradl
- Python即时网络爬虫项目启动说明
- apache + httpclient4 + jsoup 进行模拟浏览器url访问
- 《TCP/IP详解》学习笔记-第12~16章 广播/多播/IGMP/DNS/TFTP/BOOTP
- http://blog.sina.com.cn/s/blog_628cc2b70102v115.html
- windows不能在本地计算机启动sql server
- http://www.openwebx.org/docs/turbine.html
- 【计算机网络】解决win10安装华为eNSP命令行界面(CLI)输出“###”终极办法!
- Socket通讯原理(基础)
- 使用Visual Studio 2013进行单元测试--初级篇(转http://***/Article/11186)
- 网络图片加载的封装-(从零开始搭建android框架系列(4))
- 使用WireShark抓包分析Android网络请求时间(一)
- 卷积神经网络(二)
- 数据结构--深入数组
- 数据结构与算法练习-回溯、递归
- POJ 2159 Going Home 网络流 最小费用最大流