
c语言
c语言
喝泉水的泉
这个作者很懒,什么都没留下…
展开
-
用递归算法求链表中最大整数,节点的个数,所有数的平均值
#include <iostream>#include<bits/stdc++.h>using namespace std;typedef struct node{int data;struct node *next;}Node;int mymax(Node *p){if(p->next==NULL) return p->data;else return p->data>mymax(p->next)?p->data:mymax原创 2020-10-12 21:32:42 · 1443 阅读 · 0 评论 -
回文字符序列
//栈的简单应用//#include <iostream>#include<bits/stdc++.h>using namespace std;typedef struct{char *data;int top;int base;} A;void init(A &a);void push(A &a,char x);char pop(A &a);int main(){ A a; unsigned int i,j=0...原创 2020-10-11 18:40:48 · 115 阅读 · 0 评论 -
二维数组(解引用、指针数组、数组的指针)——C语言 懂了C语言指针就没问题了
https://www.cnblogs.com/lanhaicode/p/10366150.html转载 2020-09-09 22:02:40 · 167 阅读 · 0 评论 -
调用标准库函数实现堆空间申请 动态分配堆空间的方法
#include <stdio.h>#include <stdlib.h>int main(){ int n; scanf("%d",&n); double *p,*q; p=q=(double*)calloc(n,sizeof(double)); for(;p<q+n;p++) scanf("%...原创 2020-03-29 14:32:13 · 288 阅读 · 0 评论 -
对字符串按字典顺序输出(指针操作)
#include <stdio.h>#include <stdlib.h>#include <string.h>int main(){ int n; while(scanf("%d",&n)!=-1) { getchar(); char a[n][100]; char (*p)[10...原创 2020-03-29 12:01:52 · 1373 阅读 · 1 评论