自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(9)
  • 收藏
  • 关注

原创 标准io

fopen:功能:打开或创建文件FILE *fopen(const char *pathname,const char *mode);参数:pathpath–包含路径的文件名mode --文件操作模式r:只读方式打开,文件读写光标定位到文件开始r+:读写方式打开,文件读写光标定位到文件开始w:只写方式打开,如果文件存在就清零,不存在就创建w+:读写方式打开,如果文件存在就清零,不存在就创建a:只写方式打开文件,光标定位在开头,写的时候光标在末尾返回值:打开成功返回文件指针FILE*,失

2020-08-07 08:59:07 162

原创 标准输入、输出、出错的问题

FILE *stdin----指向的文件是标准输入(键盘)FILE *stdout—指向的文件是标准输出(显示屏)FILE *stderr—指向的文件是标准出错(显示屏)

2020-08-06 15:14:03 206

原创 顺序栈的基础代码

1、创建顺序栈管理结构体2、初始化一个空的顺序栈3、判断是否为空是否为满4、入栈出栈5、遍历代码:#include<stdio.h>#include <stdlib.h>#include <stdbool.h>#include <string.h>typedef struct seq_stack{int *ps;int len;int cnt;}S,*STACK;STACK init_stack(int len){STACK

2020-08-01 09:16:06 561

原创 链式栈基础代码

1、初始化2、new一个新节点3、判断是否空栈4、压栈5、出栈代码:#include<stdio.h>#include <stdlib.h>#include <stdbool.h>#include <string.h>typedef struct node{int data;struct node *next;}NODE,*PNODE;typedef struct link_stack{struct node *ptop;s

2020-07-31 20:28:28 266

原创 双向循环链表的基础代码

双向循环链表:1、设计节点2、初始化空链表3、新建一个节点4、插入节点5、删除节点6、移动节点7、查找节点8、遍历链表代码:#include<stdlib.h>#include<stdbool.h>#include<stdio.h>#include<string.h>#include<stdbool.h>typedef struct node{int data;struct node *prev;struct

2020-07-30 09:25:46 327

原创 单向循环链表基础代码

单向循环链表:1、设计节点2、初始化空链表3、新建一个节点4、插入节点5、删除节点6、移动节点7、查找节点8、遍历链表代码:#include<stdlib.h>#include<stdbool.h>#include<stdio.h>#include<string.h>#include<stdbool.h>typedef struct node{int data;struct node *next;}NODE,*

2020-07-30 08:59:28 319

原创 单向链表基础代码

单向链表1、设计节点2、初始化空链表3、新建一个节点4、插入节点5、删除节点6、移动节点7、查找节点8、遍历链表代码:#include<stdlib.h>#include<stdbool.h>#include<stdio.h>#include<string.h>#include<stdbool.h>struct student{char *name;int age;float score;};typedef

2020-07-30 08:56:23 155

原创 顺序表的初始化,插入,删除,遍历,倒序,排序

#include<stdlib.h>#include<stdbool.h>#include<stdio.h>struct ARRAY{int *parr;int len;int cnt;};void swap(struct ARRAY *p,int n1,int n2);bool is_empty(struct ARRAY *p);bool is_full(struct ARRAY *p);void init_seq_list(struct ARR

2020-07-29 09:10:15 461

原创 有关结构体传入函数的指针问题

struct ARRAY a; //定义了一个结构体init_seq_list(&a,10); //把结构体的地址传进函数void init_seq_list(struct ARRAY *p,int l) //定义一个指向结构体指针&a 和 *p 是指向同一个结构体,表示同一个数据

2020-07-29 08:44:58 429

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除