自定义博客皮肤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)
  • 收藏
  • 关注

原创 【C语言】先从键盘读入的8个学生的6门课成绩存放在二维数组student中(每一行存储一个学生的数据,第0列为学号,第1~6列依次为6门课的成绩),再从键盘读入一个学号,在student查找该学生是否

#include<stdio.h>#define NOT_FIND -1#define TOTAL_STU 8/* 函数aver的功能为:求学号为stuNo的学生的6门课课程之平均成绩,并通过函数值返回 若未找到学生stuNo,则返回NOT_FIND */ float aver(int (*pStu)[7], int stuNo);int main(void){ int student[TOTAL_STU][7]; /* the first column save stu

2021-12-05 00:10:56 653

原创 【C语言】从键盘上输入5个字符串(约定:每个字符串中字符数≤80字节),对其进行升序排序并输出。

#include<stdio.h>#include<string.h>#define ROW 5#define COL 80void sortString01(char (*pName)[COL]);//直接将姓名二维数组交换顺序(冒泡)void sortString02(char **ppnames);//使用指针数组存储姓名,将指针数组调换顺序(冒泡)int main(void){ int i; char names[ROW][COL]; char *p

2021-11-13 23:45:22 3638

原创 【C语言】使用二维数组列指针方式对矩阵iArray进行转置

#include<stdio.h>int main(){ int iArray[3][3],*piPtr; int i,j,temp; piPtr=iArray[0]; //输入数字 printf("Input 3×3 matrix:\n"); for (i=0; i<3; i++) scanf("%d %d %d",piPtr + 3 * i + 0,piPtr + 3 * i + 1,piPtr + 3 *

2021-11-11 12:28:53 850

原创 【C语言】带头结点单链表-头插尾插创建

#include<stdio.h>#include<stdlib.h>typedef struct LNode{ int data; struct LNode *next;}LNode;LNode* Create();bool InsertData_Tail(LNode *L, int num);void ViewData(LNode *L);bool InsertData_Head(LNode *L, int num);int main(){ in

2021-03-23 18:20:07 160

原创 【C语言】顺序队列(不浪费空间,使用size标记个数)-基本操作

#include<stdio.h>#include<stdlib.h>#define MAXSIZE 10typedef struct SqQueue{ int data[MAXSIZE]; int front, rear, size;}SqQueue;void InsertData(SqQueue *s);void ViewData(SqQueue *s);void DeleteData(SqQueue *s);//顺序队列(不浪费空间,使用size标志

2021-03-23 18:07:46 185

原创 【C语言】顺序队列(不浪费空间,使用操标志符)-基本操作

#include<stdio.h>#include<stdlib.h>#define MAXSIZE 10//创建顺序队列(不浪费空间使用操作标志符)typedef struct{int data[MAXSIZE];int front, rear, tag; //头指正,尾指针,队列操作标志}SqQueue;void InsertData(SqQueue *s);void ViewData(SqQueue *s);void DeleteData(SqQ.

2021-03-23 18:04:47 152

原创 【C语言】顺序栈-基本操作

#include<stdio.h>#include<stdlib.h>#define MAXSIZE 10typedef struct{int data[MAXSIZE];int top;}SqStack;//均通过传递指针的方式传参void Create();void Insert(SqStack *s);void Delete(SqStack *s);void ViewData(SqStack *s);int main(){Create.

2021-03-22 18:41:50 140

原创 【C语言】带头结点双链表-基本操作

#include<stdio.h>#include<stdlib.h>typedef struct DNode{int data;struct DNode *next,*last; //双链表每个节点带有指向下一个节点和上一个节点的指针}DNode;DNode *Create();DNode *Insert_Tail(DNode *D);void View_AllData(DNode *D);void View_OneData(DNode *D);vo.

2021-03-22 18:40:08 178

原创 【C语言】带头结点链栈-基本操作

#include<stdio.h>#include<stdlib.h>typedef struct SNode{int data;struct SNode *next;}SNode;SNode *Create(); //创建节点void InsertData(SNode *s); //进栈void Delete(SNode *s); //出栈void ViewData(SNode *s); //遍历链栈int main(){SNode *s = Creat

2021-03-22 18:30:09 1349

空空如也

空空如也

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

TA关注的人

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