静态链表例题
2016-01-08 16:31
447 查看
#include<stdio.h> struct student { int num; float score; struct student *next; }; int main() { struct student a, b, c, *head,*p; a.num = 101; a.score = 25.36; b.num = 102; b.score = 36.24; c.num = 103; c.score = 35.14; head = &a; a.next = &b; b.next = &c; c.next = NULL; p = head; do { printf("%-5d%-5.2f\n", p->num, p->score); p = p->next; }while(p!=NULL); return 0; }
相关文章推荐
- MFC入门教程
- 数列排序
- 数组去重Array
- java 中的JDK封装的数据结构和算法解析(集合类)----顺序表 List 之 ArrayList
- JDBC的那点事之DatabaseMetaData之获取表的所有列名
- IIS应用程序池死报“数据字段包含错误号” 的解决办法
- iOS 记录系统运行日志到指定文件目录
- 多线程程序里不准使用fork
- Base64编码
- 正则表达式
- JAXB实现xml与javabean的转换
- 22
- iOS开发之UICollectionView(一)
- COCOS-HTML5-3.9版本学习(四)chipmunk物理引擎的测试
- URLDecoder.decode(String str,String charSet)的大致实现原理
- UITextView高度根据内容变化
- 网页代码测试工具集合
- 大端小端
- 2015年就这样过去了
- loadrunner---压力机 出现TIME_WAIT状态的解决方法