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

甘肃建设局网站首页网站内容页显示不出来的

甘肃建设局网站首页,网站内容页显示不出来的,什么网站可以做投票,ui培训排名1、请简述栈区和堆区的区别? 2、有一个整形数组:int arr[](数组的值由外部输入决定)#xff0c;一个整型变量: x(也 由外部输入决定)。要求: 1)删除数组中与x的值相等的元素 2)不得创建新的数组 3)最多只允许使用单层循环 4)无需考虑超出新数组长度后面的元素#xff0c;所以…1、请简述栈区和堆区的区别? 2、有一个整形数组:int arr[](数组的值由外部输入决定)一个整型变量: x(也 由外部输入决定)。要求: 1)删除数组中与x的值相等的元素 2)不得创建新的数组 3)最多只允许使用单层循环 4)无需考虑超出新数组长度后面的元素所以请返回新数组的长度 例如: (1,2,3,5,7,3,5,9) x3 原数组的有效部分变为:1,2,5,7,5,9) #includestdio.h #includestring.h #includestdlib.h typedef int datatype; #define MAXSIZE 8 enum num {FALSE-1,SUCCESS }; typedef struct List {datatype data[MAXSIZE];int len; }slist; slist* create() {slist *list(slist*)malloc(sizeof(slist));if(listNULL)return NULL;memset(list-data,0,sizeof(list-data));list-len0;return list; } int full(slist *list) {return list-lenMAXSIZE?FALSE:SUCCESS; } int insert_rear(datatype element,slist *list) {if(NULLlist||full(list))return FALSE;list-data[list-len]element;return SUCCESS; } int empty(slist*list) {return list-len0?FALSE:SUCCESS; } int output(slist*list) {if(NULLlist||empty(list))return FALSE;for(int i0;ilist-len;i){printf(%-5d,list-data[i]);}puts();return SUCCESS; } void det_index(slist*list,int index) {if(NULLlist||empty(list)||index0||indexlist-len)return ;for(int iindex1;ilist-len;i){list-data[i-1]list-data[i];}list-len--; } void det_key(slist*list,datatype key) {if(NULLlist||empty(list))return ;for(int i0;ilist-len-1;i){if(list-data[i]key) {det_index(list,i);i--;}} } int main(int argc, const char *argv[]) {slist *listcreate();int arr[MAXSIZE];for(int i0;iMAXSIZE;i){printf(please enter %d element:,i1);scanf(%d,arr[i]);}int lensizeof(arr)/sizeof(arr[0]);for(int i0;ilen;i){int flaginsert_rear(arr[i],list);if(flagFALSE){puts(NULL or full);break;}}int key;printf(please enter det key:);scanf(%d,key);det_key(list,key);output(list);return 0; }3、请编程实现单链表的头插头删、尾插、尾删 #includestdio.h #includestring.h #includestdlib.h enum{FALSE-1,SUCCESS}; typedef int datatype; //定义节点结构体 //节点数据域、指针域 typedef struct Node {//数据域:存储数据元素datatype data;//指针域存储下一个节点的地址struct Node *next; }*Linklist; Linklist insert_head(Linklist head,datatype element); Linklist create(); void output(Linklist head); Linklist insert_rear(Linklist head,datatype element); Linklist det_head(Linklist head); Linklist det_rear(Linklist head); int main(int argc, const char *argv[]) {Linklist headNULL;int n;datatype element;printf(please enter n;);scanf(%d,n);for(int i0;in;i){printf(please enter %d element:,i1);scanf(%d,element);// headinsert_head(head,element);//头插headinsert_rear(head,element);//尾插}//遍历output(head);//头删 // headdet_head(head); // output(head);//尾删headdet_rear(head);output(head);return 0; } //创建新节点 Linklist create() {Linklist s(Linklist)malloc(sizeof(struct Node));if(NULLs)return NULL;s-data0;s-nextNULL;return s; } //头插入 Linklist insert_head(Linklist head,datatype element) {//创建新节点Linklist screate();s-dataelement;//判断链表是否为空if(NULLhead){heads;}else{s-nexthead;heads;}return head; } //遍历输出 void output(Linklist head) {//判断链表是否为空if(NULLhead){puts(error);return;}//输出Linklist phead;while(p!NULL){printf(%d ,p-data);pp-next;//后移}puts(); } //尾插 Linklist insert_rear(Linklist head,datatype element) {//创建新节点Linklist screate();s-dataelement;//判断链表是否为空if(NULLhead){heads;}else //存在多个链表{Linklist phead;while(p-next!NULL){pp-next;}p-nexts;}return head; } //头删 Linklist det_head(Linklist head) {//判断链表是否为空if(NULLhead)return head;//存在多个节点 1Linklist delhead;headhead-next;free(del);delNULL;return head; } //尾删 Linklist det_rear(Linklist head) {//判断链表是否为空if(NULLhead)return head;//一个节点else if(head-nextNULL){free(head);headNULL;return head;}//多个节点 2else{Linklist delhead;while(del-next-next!NULL){deldel-next;}free(del-next);del-nextNULL;return head;} }
http://www.zqtcl.cn/news/80971/

相关文章:

  • 国外做的比较的ppt网站有哪些方面wordpress主题dux
  • 企业网站托管趋势深圳网站建设素材网站
  • 临沂网站建设企业怎样用html制作一个简单的网页
  • 360做网站荆州陕西省建设工程造价管理协会网站
  • wordpress侧边栏制作电商运营seo是什么
  • 互动网站的核心技术阿里云wordpress托管
  • 建设网站模板下载wordpress mould
  • 爱站网是什么平台平谷微网站建设
  • 海安县建设局网站做二手平台公益的网站
  • 保定网站建设模板联系方式大连网红培训基地
  • 网站建设的探讨与研究上海工商局注册公司官网
  • 文档怎么做网站链接企业网站的建立视频
  • 点击一个网站跳转到图片怎么做的wordpress头部标签描述
  • 上海网站建设公司价格天华集团官网
  • 做出个人网站什么水平做新零售这些注册网站和找货源
  • 广州网站制作费用免费自己制作logo的网站
  • 网站开发财务网站开发jquery
  • 建网站的策划方案公司网站设计定制
  • 做农产品网站需要做的准备微娱网络小程序代理
  • 越南做网站rsd wordpress
  • 河北省住房和城乡建设厅网站主页杭州网站排名优化工具
  • 网站开发技术公司在哪里查关键词排名
  • 基于flash网站设计泰安网红金火火
  • 个人网站的搭建步骤怎么制作网站获取ip
  • 建设局合同备案是哪个网站蒙文网站建设的意义
  • 天津住房城乡建设厅官方网站泉州玖码网络设计
  • 开源的网站系统大数据技术就业前景
  • 公司网站设计与制作免费虚拟主机官网
  • 番禺做哪些做网站的wordpress发布文章附件
  • 网站建设论文1000字wordpress 返利