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

地税网站建设管理江苏建设信息官网网站

地税网站建设管理,江苏建设信息官网网站,自我介绍ppt模板免费,网站内容设计上的特色栈是一种在栈顶压入和弹出的数据结构#xff0c;所以只在一端进行操作.为了减小遍历开支#xff0c;所以链栈一般在首元节点处进行插入#xff08;入栈#xff09;. #include stdio.h #include stdlib.htypedef struct Node {int data;struct Node* next;…栈是一种在栈顶压入和弹出的数据结构所以只在一端进行操作.为了减小遍历开支所以链栈一般在首元节点处进行插入入栈. #include stdio.h #include stdlib.htypedef struct Node {int data;struct Node* next;}Node; Node* pushStack(Node* , int); void print_Stack(Node* ); Node* popStack(Node* ptr,int* popvalue); int main() {Node* ptr NULL; int value 0,popvalue0;/*数据进行入栈*/for (int i 0; i 10; i) {value 10 * i 10;ptrpushStack(ptr, value);}print_Stack(ptr); ptrpopStack(ptr,popvalue);printf(popvalue%d\n,popvalue);print_Stack(ptr);return 0; } /*执行压栈操作*/ Node* pushStack(Node* ptr, int pushvalue) {if (ptr NULL){Node* newNode (Node*)malloc(sizeof(Node));ptr newNode; newNode-next NULL; newNode-data pushvalue;}else {Node* newNode (Node*)malloc(sizeof(Node));newNode-data pushvalue;newNode-next ptr;ptr newNode;}return ptr; }void print_Stack(Node* ptr) {Node* strptr;while (str-next!NULL) {printf(%d\n, str-data);str str-next;}printf(%d\n, str-data); } /*执行出栈操作*/ Node* popStack(Node* ptr,int* popvalue) { Node* delete_ptrNULL;*popvalueptr-data;delete_ptrptr;ptrptr-next;free(delete_ptr);delete_ptrNULL; return ptr; } 出栈返回栈顶数据代码 #include stdio.h #include stdlib.htypedef struct Node {int data;struct Node* next; }Node; Node* pushStack(Node* , int); void print_Stack(Node* ); int popStack(Node** ptr,int popvalue);int main() {Node* ptr NULL; int value 0,popvalue0;/*数据进行入栈*/for (int i 0; i 10; i) {value 10 * i 10;ptrpushStack(ptr, value);}print_Stack(ptr); popvaluepopStack(ptr,popvalue);printf(popvalue%d\n,popvalue);print_Stack(ptr);return 0; }/*执行压栈操作*/ Node* pushStack(Node* ptr, int pushvalue) {if (ptr NULL){Node* newNode (Node*)malloc(sizeof(Node));ptr newNode; newNode-next NULL;newNode-data pushvalue;}else {Node* newNode (Node*)malloc(sizeof(Node));newNode-data pushvalue;newNode-next ptr;ptr newNode;} return ptr; }void print_Stack(Node* ptr) {Node* strptr;while (str-next!NULL) {printf(%d\n, str-data);str str-next;}printf(%d\n, str-data); }/*进行出栈操作*/ int popStack(Node** ptr,int popvalue) { Node* delete_ptrNULL;popvalue(*ptr)-data;delete_ptr*ptr;*ptr((*ptr)-next);free(delete_ptr);delete_ptrNULL; return popvalue; }修改为具有头指针的形式
http://www.pierceye.com/news/742580/

相关文章:

  • 淘掌门官方网站wordpress注册验证邮箱验证
  • 牡丹江市建设局网站网站功能项目报价
  • 网站系统管理网站制作报价ihanshi
  • 陈村网站开发网站应该如何进行优化
  • 做网站什么语言最好电商有哪些平台app
  • 做号网站做旅游网站运营
  • 陕西省西安市网站建设公司都江堰网站建设
  • 怎么做网站xml地图导航条 Wordpress
  • 网站建设合同或方案书网站备案多长时间
  • 广州学生做网站山东德州网站建设哪家最专业
  • 类似pc蛋蛋的网站建设建设官方网站意义
  • 公积金门户网站建设方案阿里国际站韩语网站怎么做
  • 粉色大气妇科医院网站源码软件系统app开发
  • 跨境自建站模板建设个公司网站需要多少费用
  • 帮客户做ppt什么的在哪个网站泰安做网站多少钱
  • 如何查网站空间游戏网站开发找什么人可建
  • 网站备案图标怎么添加为农村建设网站报告
  • 网站建设公司成都北京有哪些炫酷的网站页面
  • 中医医院网站建设需求网络优化这个行业怎么样
  • 做兼职网站的主要参考文献洪栾单页网站建设
  • 市中移动网站建设辽宁招标网
  • wordpress+纯净主题国外seo工具
  • 网站备案 深圳wap免费空间
  • 如何建设网站安全外贸公司名称
  • 网站前后台jsp网站模版
  • 网站内页标题怎么填网站设计方案大全
  • 网站优化毕业设计威海网站建设 孔
  • 网站建设方案书制作流程北京做网站推广seo
  • 钦州网站建设设计南宁企业网站建设技术公司
  • 公路建设查询网站蛋花儿wordpress主题