为什么在第一个输出的字符类型总是会比实际少1,为什么 摘要:#includeint number(char c) { int letter=0,number=0,kong=0,other=0; while((c=getchar())!='\n'…… 文章列表 2022年11月24日 0 点赞 0 评论 226 浏览 评分:2.0
自定义函数去字符串拼接 摘要:#include<stdio.h>char *str_concat(char *s1,char *s2){ char *p=s1,*q=s2; while(*p!='\0') p++;…… 文章列表 2022年11月24日 0 点赞 0 评论 247 浏览 评分:0.0
C语言小代码 摘要:/* 将一个5x5的矩阵中最大的元素放在中心, 4个角分别放4个最小的元素(顺序为从左到右,从上到下依次从小到大存放), 写一函数实现之。用main函数调用 */ #include …… 文章列表 2022年11月24日 0 点赞 0 评论 222 浏览 评分:8.0
实现对字符串内用输出 摘要:/* 输入一行文字,找出其中大写字母、小写字母、空格、数字以及其他字符各有多少 */ #include<stdio.h> #include<string.h> int main()…… 文章列表 2022年11月24日 0 点赞 0 评论 190 浏览 评分:0.0
指定字符串到另一个字符串 摘要:/* 有一字符串,包含n个字符。 写一函数,将此字符串中 从第m个字符开始的全部字符复制成为另一个字符串 */ #include<stdio.h> #include<string.…… 文章列表 2022年11月24日 0 点赞 0 评论 192 浏览 评分:0.0
C语言课后习题8.4 摘要:/* 有n个整数,使前面各数顺序向后移m个位置, 最后m个数变成最前面m个数, 写一函数实现以上功能,在 主函数中输人n个整数和输出调整后的n个数 */ #include<st…… 文章列表 2022年11月23日 0 点赞 0 评论 183 浏览 评分:8.0
通过指针对三个数排序 摘要:/* 输入3个整数,要求按由小到大的顺序输出 */ #include<stdio.h> void swap (int *p_a,int *p_b) { int temp …… 文章列表 2022年11月23日 0 点赞 0 评论 191 浏览 评分:0.0
链表增删改查 摘要:#include <stdio.h> #include <stdlib.h> #define COUNT 5 typedef struct LNode { int num; struc…… 文章列表 2022年11月22日 0 点赞 1 评论 169 浏览 评分:9.9
向链表插入数据 摘要:/* 写一个函数insert,用来向一个动态链表插入结点 */ #include<stdio.h> #include<stdlib.h> typedef struct LN…… 文章列表 2022年11月22日 0 点赞 1 评论 135 浏览 评分:9.9