list
来源:互联网 发布:php开发实战1200例pdf 编辑:程序博客网 时间:2024/06/06 10:58
pointers on c
里面的简单的单项链表……发现自己现在太弱了……
#include <stdio.h>#include <stdlib.h>typedef struct NOED{ struct NOED *link; int value;} Node;Node a;intsll_insert(register Node **linkp, int new_value){ register Node *current; register Node *new; while ((current = *linkp) != NULL && current->value < new_value)linkp = ¤t->link; new =(Node *)malloc(sizeof(Node)); if (new == NULL)return 0; new->value = new_value; new->link = current; *linkp = new; return 1;} intmain(){ int n, i, x; scanf("%d", &n); Node *root; Node a; root = &a; for (i=0; i<n; i++) {scanf("%d", &x);sll_insert(&root, x); }}
哎……一切都慢慢来……不过不知道我该怎么往下发展……难道是水题么!
- List
- list
- List
- LIST
- list
- list
- List
- list
- list
- List
- list
- LIST
- List
- List
- List
- list
- list
- list
- eclipse快捷键
- oracle中带有特殊符号的模糊查询
- Day01 第一天 java基础
- 文艺编程 Literate Programming (原文中英文对照)
- cpio命令详解
- list
- 【字符串模拟TWO】我又手贱了-HDU 1177 "AC TODAY"
- php date函数告警处理
- XPath 简介
- ubuntu托盘显示ibus小图标
- 数据库三范式
- 链表的应用——垃圾收集机制&动态分配内存的工作原理
- IOS声音的转换
- 程序在的内存中的分配(常量,局部变量,全局变量,程序代码)