摘要: C语言strcat()库函数的实现#include#includevoid MyStrcat(char *dstStr, char *srcStr){ int a,b,i; a=strlen(dstStr); b=strlen(srcStr... 阅读全文
posted @ 2017-09-08 20:59 Newtol 阅读(342) 评论(0) 推荐(0) 编辑
摘要: C语言根据国家英文首字母进行排序#include #include #define MAX_LEN 10#define N 150void SortString(char str[][MAX_LEN],int n);int main(){ ... 阅读全文
posted @ 2017-09-08 20:21 Newtol 阅读(2318) 评论(0) 推荐(0) 编辑
摘要: C语言使用递归法计算n的阶乘#include long Fact(int n);int main(){ int n; long ret; printf("Input n:"); scanf("%d",&n); ret =Fact... 阅读全文
posted @ 2017-09-08 19:58 Newtol 阅读(1743) 评论(0) 推荐(0) 编辑
摘要: C语言实现对字符串的逆序输出方法一:#include #include #include void Inverse(char str[], char ptr[]);int main(){ char str[100]; char ptr[100];... 阅读全文
posted @ 2017-09-08 16:51 Newtol 阅读(1955) 评论(0) 推荐(0) 编辑
摘要: C语言strcpy()库函数的实现 strcpy()是C语言对字符串处理的库函数中的一种; 参数类型为: char stra;const char strb; 函数为: char *strcpy(stra,strb);/*其中str... 阅读全文
posted @ 2017-09-08 16:23 Newtol 阅读(1282) 评论(0) 推荐(0) 编辑
摘要: C语言用指针实现两数组的值互换#include #define N 10void ReadData(int a[], int n);void PrintData(int a[], int n);void Swap(int *x, int *y);int m... 阅读全文
posted @ 2017-09-08 15:07 Newtol 阅读(2969) 评论(0) 推荐(0) 编辑
摘要: 计算一个英文单词中有几个字母计算一篇以空格为分隔符的文章中单词的数目计算一个英文单词中有几个字母#include #include unsigned int MyStrlen(const char str[]){ int i; unsigned ... 阅读全文
posted @ 2017-09-08 14:57 Newtol 阅读(475) 评论(0) 推荐(0) 编辑