自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(6)
  • 收藏
  • 关注

原创 将长度为n的数组arr后面m个数据移到最前面

#include<stdio.h> #include<stdlib.h> #include<string.h> #include<ctype.h> #include<assert.h> void Move(int *arr,int n,int m) { if(arr==NULL||n<=0||n<m) { return...

2019-10-31 17:21:39 481

原创 写一个函数,输入一行字符,将此字符串中最长的单词输出

#include<stdio.h> #include<stdlib.h> #include<string.h> void MaxWord(const char *str) { char *maxstr=(char *)malloc((strlen(str)+1)*sizeof(char));

2019-10-31 16:38:01 2284

原创 写一个函数,将数字转换为字符串

比如1234->“1234” #include<stdio.h> #include<stdlib.h> #include<string.h> #include<ctype.h> #include<assert.h> void Myitoa(char *buf,int n) { int i=0; do { buf[i++]...

2019-10-28 18:23:46 582

原创 写一个函数,使输入的一个字符串按反序存放,在主函数中输入和输出字符串

#include <stdio.h> #include<string.h> #include<stdlib.h> void Reverse (char *str) { char *p=str; char tmp; //找出字符串结尾 while(*p!='\0') p++; //p和str交换 for(p--;str<p;str++,p--)...

2019-10-28 17:53:31 2410

原创 结构体大小

typedef:定义类型,给一种数据类型起别名 结构体大小: 内存对齐:每个人数据存放的内存地址,能整除数据本身的大小(快速 1、前面所有成员的字节数能整除当前成员大小 2、结构体的大小必须能整除单个最大类型的大小 #include<stdio.h> #include<string.h> typedef struct A { float a;//4 int b;//4...

2019-05-26 17:52:37 186

原创 数字处理问题

数字处理问题 1、求出它是几位数 2、顺序输出各位数字 3、逆序输出各位数字 #include<stdio.h> #include<math.h> int GetFigures(int n) { int count=0; while(n!=0) { n/=10; count++; } return count; } void PrintOrder(int ...

2019-04-17 21:10:04 172

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除