自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 断言

assert(表达式) 表达式为真什么都不发生 否则程序奔溃

2020-10-18 20:47:25 195

原创 const

*定义常变量,只读不写 基本数字类型对const是透明的 在指针中修饰它的直接右边 赋值号左边才用到它的权限 权限的传递,权限可以等同或缩小传递,不可以放 const在c语言中最主要的是不修改值的函数 指针形参前加const ...

2020-10-18 20:21:49 108

原创 字符串复制

#include<stdio.h> void MyStrcpy(char *arr,char *brr)//方法一:数组 { int i=0; while(arr[i]!=’\0’) { brr[i]=arr[i]; i++; } brr i=’\0’; } void MyStrcpy(char *arr,char *brr)//方法二:指针 { while(*arr!=’\0’) { *brr = * arr; arr++; brr++; } *brr=’\0’; } void MyStrcp

2020-10-16 08:11:48 1472

原创 约瑟夫问题

#include<stdio.h> #include<stdlib.h> typedef struct node { int data; struct node *next; }node; node *create(int n)//创建链表 { node *p=NULL,*head; head=(node *)malloc(sizeof(node)); p=head; node *s; int i=1; if(n!=0) { while(i<=n) { s=(node *)ma

2020-10-14 14:12:41 171

原创 swap交换函数

#include<stdio.h> void Swap(int *p,int *q) { int temp; temp=*p; *p=*q; *q=temp; } void main() { int a,b; printf(“请输入\na,b\n”); scanf("%d,%d",&a,&b); Swap(&a,&b); printf(“a=%d b=%d\n”,a,b);

2020-10-12 22:22:18 559 2

原创 输出一个数的位数 逆序 每位数字

#include<stdio.h> #include<math.h> int Num_1(long long x)//求位数 { int count; count=0; while(x!=0) { x/=10; count++; } return count; } void Num_2(long long x)//逆序输出 { while(x) { if(x<0) { x*=-1; } printf("%d “,x%10); x/=10; } } void Num_3(long

2020-10-12 17:33:19 785

原创 begin

#include<stdio.h> void main() { printf(“梦开始的地方”); }

2020-10-12 17:31:53 253

空空如也

空空如也

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

TA关注的人

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