摘要:
这次实现的是递归,通过递归,我们可以尽量的减少代码量来实现功能。但缺点是递归的每层级调用都会耗掉一部分的内存。 1 int tobinary(int a){ 2 if(a/2) 3 printf("%d",tobinary(a/2)); 4 return a%2; 5 } 6 void main(v 阅读全文
posted @ 2020-05-10 12:11
四字又名
阅读(220)
评论(0)
推荐(0)
摘要:
利用stdarg.h库支持的宏函数来接收数据实现储存任意大小的数组 1 #include<stdio.h> 2 #include<stdlib.h>//malloc 3 #include<stdarg.h>//宏支持原型 4 #define SIZE 5 5 double * CreateArray 阅读全文
posted @ 2020-05-05 12:31
四字又名
阅读(353)
评论(0)
推荐(0)
摘要:
1 void main(void){ 2 unsigned int d=0; 3 char c[10]="居中",y; 4 /* 5 类型 0~7 6 大小 8~15 7 对齐方式 16~17 8 粗体 18 9 斜体 19 10 下划线 20 11 */ 12 unsigned int x; 13 阅读全文
posted @ 2020-05-03 11:16
四字又名
阅读(353)
评论(0)
推荐(0)
浙公网安备 33010602011771号