当前位置: 首页 > news >正文

网页qq直接登陆seo培训多少钱

网页qq直接登陆,seo培训多少钱,扁平化设计个人网站,前端是wordpress做的吗本变博客源于自己想复习一下C语言&#xff0c;所以便自己动手复习了一下链表的相关操作。做个人记录使用。 main.c #include <stdio.h> #include "list.h"int main() {student *a;printf("hello world\n") ;printf("----初始化列表----------\…

本变博客源于自己想复习一下C语言,所以便自己动手复习了一下链表的相关操作。做个人记录使用。
main.c

#include <stdio.h>
#include "list.h"int main()
{student *a;printf("hello world\n") ;printf("----初始化列表----------\n");a=init();printf("----创建列表----------\n");create_front_list(a,3);printf("list的个数为:count= %d\n",count);printf("----读取列表3位置上数据----------\n");read_any_list(a,3);printf("------------读取全部数据------------------\n");read_all_list(a);printf("----------插入列表,插入到位4的后面--------------------\n");insert_behind_list(a ,4);printf("----------插完后的列表数据---------\n");read_all_list(a);printf("------------删除列表指定位置的数据-------------------\n");delete_list(a,2);printf("-------------删除后列表的数据------------------\n");read_all_list(a);return 0;
}

list.c

#include<stdio.h>
#include <stdlib.h>
#include "list.h"
int count = 0;
student *init()
{//chuangjian节点student * head=(struct student *)malloc(sizeof(student));if(head==NULL){printf("n=malloc failed \n");return NULL;}head->num=0;head->score=99.2;head->next=NULL;count++;return head;}//链表的建立
void create_front_list(student *head,int n)
{   int i;student * last;student * s;last=head;s=head;printf("请你输入%d个整数\n",n);for(i=0;i<n;i++){printf("begin to input\n");s->next=(struct student *)malloc(sizeof(student));last=s->next;s=last;scanf("%d,%f",&(s->num),&(s->score));printf("end to input\n");count++;}s->next=NULL;last=NULL;s=NULL;return ;
}//链表的读取操作
void read_all_list(student * head)
{int i;printf("total data in list is \n");student *re=head;if(head==NULL){printf("NO data\n");return ;}else{for(i=0;i<count;i++){printf("num = %d  score= %f \n",re->num, re->score);re=re->next;}}}//读取其中指定第几个节点的数值
void read_any_list(student * head,int n)
{  int i=1;student *re=head;printf("That you want to read list sequence is  %d\n",n);if(n>count){printf("The number you have input exceeds the max length of this list \n ");return ;}else{while(true){re=re->next;i++;if(i==n){printf("the number has been find ,data as follow \n");printf("num= %d, score= %f\n",re->num,re->score);break;}}return ;}}//链表的插入//由于是单链表所以我这里只使用尾部
void insert_behind_list(student * head ,int n)
{printf("insert behind list \n\n");int i;student * s=head;if(n>count){//表名插入的位置已经查过了节点长度printf("you has exceed this max length\n");return ;}else{    //开辟一个新的节点student * last=(struct student *)malloc(sizeof(student));printf("please input your inserted data \n");scanf("%d,%f",&(last->num),&(last->score));for(i=1;i<n;i++){s=s->next;//借助一个指针指向你想插入的节点前面}last->next=s->next;s->next=last;last=NULL;printf("---------end of insert data--------\n");count++;}}//链表的删除
void delete_list(student * head,int n)
{int i;student * s=head;student * q=head->next;printf("the number do you want to delete is number %d",n);if(n>count){printf("there are no data \n");}else{for(i=1;i<n;i++){s=s->next;q=q->next;}printf("你想删除的数据是:%d,%f",q->num,q->score);s->next=q->next;free(q);count--;//记录节点的个数的}}

list.h

#define true 1
#define flase 0typedef struct student{int num;float score;struct student *next ;}student;
extern int count;
student *init();
void create_front_list(student *head,int n);
void read_all_list(student * head);
void read_any_list(student * head,int n);
void insert_behind_list(student * head ,int n);
void delete_list(student * head,int n);


备注:每次更改操作后必须使用count–,否则内存就会出现泄漏。

hello world
----初始化列表----------
----创建列表----------
请你输入3个整数
begin to input
1,1
end to input
begin to input
2,2
end to input
begin to input
3,3
end to input
list的个数为:count= 4
----读取列表3位置上数据----------
That you want to read list sequence is 3
the number has been find ,data as follow
num= 2, score= 2.000000
------------读取全部数据------------------
total data in list is
num = 0 score= 99.199997
num = 1 score= 1.000000
num = 2 score= 2.000000
num = 3 score= 3.000000
----------插入列表,插入到位4的后面--------------------
insert behind list

please input your inserted data
4,4
---------end of insert data--------
----------插完后的列表数据---------
total data in list is
num = 0 score= 99.199997
num = 1 score= 1.000000
num = 2 score= 2.000000
num = 3 score= 3.000000
num = 4 score= 4.000000
------------删除列表指定位置的数据-------------------
the number do you want to delete is number 2你想删除的数据是:2,2.000000-------------删除后列表的数据------------------
total data in list is
num = 0 score= 99.199997
num = 1 score= 1.000000
num = 3 score= 3.000000
num = 4 score= 4.000000

Process returned 0 (0x0) execution time : 27.276 s
Press any key to continue.


在这里插入图片描述

http://www.ds6.com.cn/news/122421.html

相关文章:

  • 找人做网站需要先了解哪些要点广告开户南京seo
  • 用凡科做网站需要花钱吗品牌营销策划方案怎么做
  • 网站设计制作价钱低服务外包平台
  • 网站中弹出广告怎么做b站免费建网站
  • 莘县做网站百度海南分公司
  • 免费公网网站建设百度推广投诉电话
  • 德州极速网站建设 小程序2024新闻热点摘抄
  • 网站编辑楼盘详情页怎么做网络营销策划推广公司
  • 网站建设 推广找山东博达读书网站排名
  • wordpress程序员博客主题谷歌seo公司
  • 冷水江网站定制搜狗关键词排名查询
  • 长沙建站公司模板线上广告接单平台
  • 个人做网站设计悟空建站seo服务
  • 购物网站排名哪家好网站模板及源码
  • 大兴快速网站建设公司网络推广专员是干什么的
  • 做微信网站的公司做网站公司排名
  • iis 网站拒绝显示此网页爱网站关键词挖掘
  • 沈阳企业网站设计制作网站首页排名seo搜索优化
  • 做网站服务器用谁的武汉服装seo整站优化方案
  • 网站设计论文答辩问题及答案网络营销八大工具
  • 北京最大的网站开发公司网站怎么做出来的
  • 怎么把网站做的更好全球十大网站排名
  • 网站建设连接数据库成都建设网官网
  • 做论坛网站4g空间够不够用seo引擎优化公司
  • 打开一个网站为繁体字是怎么做的宁波网站推广营销
  • 专业团队张益达图片关键词seo优化软件
  • 做网站的论文摘要营销咨询公司排名
  • wordpress 登录后可看郑州网站优化软件
  • 咨询公司管理制度百度推广seo效果怎么样
  • 怎样做自己介绍网站深圳推广公司哪家好