- 博客(9)
- 收藏
- 关注
原创 字符串的逐个输出
字符串逐个输出 #include <stdio.h> #include <string.h> int main(void) { char a[100], temp; int i = 0, j; printf("inpur your words:"); while((temp = getchar()) != '\n') //判断字符串输入完毕 a[i++] = temp; for(j=0; j<i; j++) printf("
2021-02-25 22:33:54
3683
1
转载 后缀求值
https://blog.youkuaiyun.com/qq_40100414/article/details/113814417?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522161422777016780265425845%2522%252C%2522scm%2522%253A%252220140713.130102334…%2522%257D&request_id=161422777016780265425845&biz_id=0&
2021-02-25 17:38:47
104
原创 数据结构 二叉树的建立 video 48
数据结构 二叉树的建立 video 48 #include <stdio.h> typedef char ElemType; typedef struct BiTNode { char data; struct BiTNode *lchild, *rchild; }BiTNode, *BiTree; //常见二叉树 BiTree,前序遍历的方式输入数据 CreateBiTree(BiTree *T) { char c; scanf("%c", &c);
2021-02-15 17:05:10
116
原创 数据结构 video 25 二进制转换为十进制
数据结构 video 25 二进制转换为十进制 #include <stdio.h> #include <stdlib.h> #include <math.h> #define STACK_INIT_SIZE 20 //栈原始大小,20 #define STACKINCREAMENT 10 //每次增加10 typedef char ElemType; // ?定义一种类型 typedef struct // ?为什么结构体也要加一个typedef
2021-02-11 20:07:42
965
原创 video45 单链表的头插法
video45 单链表的头插法 //video 45 单链表的头插法 #include <stdio.h> #include <stdlib.h> struct Book//定义一个结构体,就结构体指向自身。不能理解 { char title[128]; char author[40]; struct Book *next;//定义指向自身的指针可以通过,因为指针打的大小是确定的,即一个数。 }; void getInput(struct Book *b
2021-02-02 00:06:25
915
原创 video 44图书馆(动态申请结构体)
video 44图书馆(动态申请结构体) video44 构建图书馆m,每个元素指向一个动态申请架构体变量的指针。 #include <stdio.h> //上面程序的结构体指针 #include <stdlib.h> struct Date;//声明 struct Date{ int year; int month; int day; }date; struct Book;//声明 struct Book{
2021-02-01 22:34:57
223
原创 video 44 图书馆(非指针版本,便于理解)
video 44 图书馆(非指针版本,便于理解) video44 #include <stdio.h> struct Date;//声明 struct Date{ int year; int month; int day; }date; struct Book;//声明 struct Book{ char title[128]; char author[40];
2021-02-01 20:29:12
255
原创 video 44图书馆(结构体的指针版)
图书馆 video44 构建图书馆m,每个元素指向一个动态申请架构体变量的指针。 #include <stdio.h> //上面程序的结构体指针 #include <stdlib.h> struct Date;//声明 struct Date{ int year; int month; int day; }date; struct Book;//声明 struct Book{ char title[128];
2021-02-01 10:04:34
104
原创 区别指针和指针数组
区别指针,指针数组,数组指针 1指针,p指向元素的地址。 #include <stdio.h> int main() { int a=2; int *p=&a;//可以分开,p=&a; printf("%d\n",*p); return 0; } 2指针数组**,**由指针构成的一个数组。 (方法:1新建一组数据;2建立指针数组p[5]={&a,&b,&c};3输出p[1]) #include <stdio.h
2021-01-29 19:47:50
121
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅