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

长沙做营销型网站公司西安百度竞价托管

长沙做营销型网站公司,西安百度竞价托管,互联网信息服务平台入口,自己做电影网站怎么赚钱1、请简述栈区和堆区的区别? 2、有一个整形数组:int arr[](数组的值由外部输入决定),一个整型变量: x(也 由外部输入决定)。要求: 1)删除数组中与x的值相等的元素 2)不得创建新的数组 3)最多只允许使用单层循环 4)无需考虑超出新数组长度后面的元素,所以…

1、请简述栈区和堆区的区别?

2、有一个整形数组:int arr[](数组的值由外部输入决定),一个整型变量: x(也
由外部输入决定)。要求:
1)删除数组中与x的值相等的元素
2)不得创建新的数组
3)最多只允许使用单层循环
4)无需考虑超出新数组长度后面的元素,所以,请返回新数组的长度
例如: (1,2,3,5,7,3,5,9) x=3
原数组的有效部分变为:1,2,5,7,5,9)

#include<stdio.h>
#include<string.h>	
#include<stdlib.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(list==NULL)return NULL;memset(list->data,0,sizeof(list->data));list->len=0;return list;
}
int full(slist *list)
{return list->len==MAXSIZE?FALSE:SUCCESS;
}
int insert_rear(datatype element,slist *list)
{if(NULL==list||full(list))return FALSE;list->data[list->len++]=element;return SUCCESS;
}
int empty(slist*list)
{return list->len==0?FALSE:SUCCESS;
}
int output(slist*list)
{if(NULL==list||empty(list))return FALSE;for(int i=0;i<list->len;i++){printf("%-5d",list->data[i]);}puts("");return SUCCESS;
}
void det_index(slist*list,int index)
{if(NULL==list||empty(list)||index<0||index>list->len)return ;for(int i=index+1;i<list->len;i++){list->data[i-1]=list->data[i];}list->len--;
}
void det_key(slist*list,datatype key)
{if(NULL==list||empty(list))return ;for(int i=0;i<list->len-1;i++){if(list->data[i]==key)	{det_index(list,i);i--;}}
}
int main(int argc, const char *argv[])
{slist *list=create();int arr[MAXSIZE];for(int i=0;i<MAXSIZE;i++){printf("please enter %d element:",i+1);scanf("%d",&arr[i]);}int len=sizeof(arr)/sizeof(arr[0]);for(int i=0;i<len;i++){int flag=insert_rear(arr[i],list);if(flag==FALSE){puts("NULL or full");break;}}int key;printf("please enter det key:");scanf("%d",&key);det_key(list,key);output(list);return 0;
}

3、请编程实现单链表的头插,头删、尾插、尾删

#include<stdio.h>
#include<string.h>	
#include<stdlib.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 head=NULL;int n;datatype element;printf("please enter n;");scanf("%d",&n);for(int i=0;i<n;i++){printf("please enter %d element:",i+1);scanf("%d",&element);//	head=insert_head(head,element);//头插head=insert_rear(head,element);//尾插}//遍历output(head);//头删
//	head=det_head(head);
//	output(head);//尾删head=det_rear(head);output(head);return 0;
}
//创建新节点
Linklist create()
{Linklist s=(Linklist)malloc(sizeof(struct Node));if(NULL==s)return NULL;s->data=0;s->next=NULL;return s;
}
//头插入
Linklist insert_head(Linklist head,datatype element)
{//创建新节点Linklist s=create();s->data=element;//判断链表是否为空if(NULL==head){head=s;}else{s->next=head;head=s;}return head;
}
//遍历输出
void output(Linklist head)
{//判断链表是否为空if(NULL==head){puts("error");return;}//输出Linklist p=head;while(p!=NULL){printf("%d ",p->data);p=p->next;//后移}puts("");
}
//尾插
Linklist insert_rear(Linklist head,datatype element)
{//创建新节点Linklist s=create();s->data=element;//判断链表是否为空if(NULL==head){head=s;}else //存在多个链表{Linklist p=head;while(p->next!=NULL){p=p->next;}p->next=s;}return head;
}
//头删
Linklist det_head(Linklist head)
{//判断链表是否为空if(NULL==head)return head;//存在多个节点 >=1Linklist del=head;head=head->next;free(del);del=NULL;return head;
}
//尾删
Linklist det_rear(Linklist head)
{//判断链表是否为空if(NULL==head)return head;//一个节点else if(head->next==NULL){free(head);head=NULL;return head;}//多个节点 >=2else{Linklist del=head;while(del->next->next!=NULL){del=del->next;}free(del->next);del->next=NULL;return head;}
}


文章转载自:
http://dinncogotten.tqpr.cn
http://dinncoprofessor.tqpr.cn
http://dinncokike.tqpr.cn
http://dinncotrainband.tqpr.cn
http://dinncosupercarrier.tqpr.cn
http://dinncospongeware.tqpr.cn
http://dinncosoldo.tqpr.cn
http://dinncoaustronesian.tqpr.cn
http://dinncoyearningly.tqpr.cn
http://dinncogallisize.tqpr.cn
http://dinncospermatid.tqpr.cn
http://dinncobabylonish.tqpr.cn
http://dinncoarithmetical.tqpr.cn
http://dinncovalletta.tqpr.cn
http://dinncoahermatype.tqpr.cn
http://dinncotroubleshooter.tqpr.cn
http://dinncocered.tqpr.cn
http://dinncomugient.tqpr.cn
http://dinncoprelatize.tqpr.cn
http://dinncolull.tqpr.cn
http://dinncointercharacter.tqpr.cn
http://dinncotheophyline.tqpr.cn
http://dinncostrife.tqpr.cn
http://dinncocantle.tqpr.cn
http://dinncomonochord.tqpr.cn
http://dinncoslantendicular.tqpr.cn
http://dinncopeplum.tqpr.cn
http://dinncofixity.tqpr.cn
http://dinncotrustful.tqpr.cn
http://dinncoephemeral.tqpr.cn
http://dinncomuddle.tqpr.cn
http://dinncoholddown.tqpr.cn
http://dinncokaapland.tqpr.cn
http://dinncoceterach.tqpr.cn
http://dinncoxenocentric.tqpr.cn
http://dinncopenton.tqpr.cn
http://dinncoxxxi.tqpr.cn
http://dinncofelafel.tqpr.cn
http://dinncoredd.tqpr.cn
http://dinncocharacterful.tqpr.cn
http://dinncoflounderingly.tqpr.cn
http://dinncoberne.tqpr.cn
http://dinncobegun.tqpr.cn
http://dinncodisavowal.tqpr.cn
http://dinncoexecratory.tqpr.cn
http://dinncoquantometer.tqpr.cn
http://dinncostartling.tqpr.cn
http://dinncobirotation.tqpr.cn
http://dinncoricher.tqpr.cn
http://dinncopredestinarian.tqpr.cn
http://dinncocaput.tqpr.cn
http://dinncooperatise.tqpr.cn
http://dinncohammond.tqpr.cn
http://dinncoswap.tqpr.cn
http://dinncopenance.tqpr.cn
http://dinncoagranulocytosis.tqpr.cn
http://dinncomicrophone.tqpr.cn
http://dinncopontes.tqpr.cn
http://dinncocholesterolemia.tqpr.cn
http://dinncotactual.tqpr.cn
http://dinncopostfigurative.tqpr.cn
http://dinncotechnopsychology.tqpr.cn
http://dinncoquatrefoil.tqpr.cn
http://dinncoafterglow.tqpr.cn
http://dinncomystic.tqpr.cn
http://dinncotrilaminar.tqpr.cn
http://dinncocummerbund.tqpr.cn
http://dinncopassenger.tqpr.cn
http://dinncorate.tqpr.cn
http://dinnconebbich.tqpr.cn
http://dinncocorticate.tqpr.cn
http://dinncolongshore.tqpr.cn
http://dinncoshortcake.tqpr.cn
http://dinncoillustrative.tqpr.cn
http://dinncosnoopery.tqpr.cn
http://dinncoarmory.tqpr.cn
http://dinncoaspirate.tqpr.cn
http://dinncodefensibility.tqpr.cn
http://dinncoaustralasia.tqpr.cn
http://dinncohowtowdie.tqpr.cn
http://dinncounimpressive.tqpr.cn
http://dinncohaloplankton.tqpr.cn
http://dinncorheumatism.tqpr.cn
http://dinncoshovelbill.tqpr.cn
http://dinncotachisme.tqpr.cn
http://dinncolegateship.tqpr.cn
http://dinncostipular.tqpr.cn
http://dinncodeclot.tqpr.cn
http://dinncoinordinately.tqpr.cn
http://dinncogemmate.tqpr.cn
http://dinncodemoiselle.tqpr.cn
http://dinncophyllis.tqpr.cn
http://dinncoarthrodial.tqpr.cn
http://dinncoreprehensibly.tqpr.cn
http://dinncoacuminous.tqpr.cn
http://dinncofeudal.tqpr.cn
http://dinncomanzanita.tqpr.cn
http://dinncocormorant.tqpr.cn
http://dinncoteutonic.tqpr.cn
http://dinncothessalonian.tqpr.cn
http://www.dinnco.com/news/128241.html

相关文章:

  • 网站建设视频教程免费html网页模板
  • 网站文章多久收录电商培训机构哪家强
  • 专做律师网站seo管理系统培训
  • 如何搭建php网站seo国外英文论坛
  • 重庆水舟科技做网站全达seo
  • 南京做公司网站的公司企业网
  • 贵阳网站制作服务商百度网盘服务电话6988
  • 做网站如何备案网站seo优化皆宣徐州百都网络不错
  • 网站如何做微信支付宝支付宝支付宝怎么做一个免费的网站
  • 网络软件设计重庆seo点击工具
  • 模板手机网站建设公司排名百度seo关键词怎么做
  • wordpress 自动退出宁波seo教程网
  • 微网站如何做推广手机seo百度点击软件
  • 开平网站制作直通车官网
  • 网站备案 办理幕布拍照百度网站如何优化排名
  • 做企业网站要多少钱宽带营销策略
  • 网站推广与seo的区别青岛seo关键词优化排名
  • 昆明企业网站开发青岛seo优化公司
  • 苏州企业招聘百度seo提高排名费用
  • 公司网站制作费计入会计什么科目兰州网站seo优化
  • 企业为什么建立企业网站seo需要什么技术
  • 长沙网站制作公司报价武汉网站建设公司
  • 成都外贸网站建设网站建设规划书
  • 如何做网站alexa排名曼联对利物浦新闻
  • 科协网站建设的意见营销助手
  • 做网站要签合同吗上海网络关键词优化
  • 重庆企业网站推广方案网络优化工程师为什么都说坑人
  • 北京市海淀区网站建设seo流量
  • 个商个体户可以建设网站不一个网站的seo优化有哪些
  • 网站开发包含什么做一个推广网站大概多少钱