摘要: 1 /* 2 varargs.c -- use variable number of arguments 3 */ 4 5 #include <stdio.h> 6 #include <stdarg.h> 7 8 double sum(int, ...); 9 10 int main() 11 { 阅读全文
posted @ 2018-07-03 22:22 web1013 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 1 /* 2 mems.c -- 使用 memcpy() 和 memmove() 3 */ 4 5 #include <stdio.h> 6 #include <string.h> 7 #include <stdlib.h> 8 9 #define SIZE 10 10 11 void show_a 阅读全文
posted @ 2018-07-03 15:15 web1013 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 1 /* 2 qsorter.c -- 用 qsort() 排序一组数字 3 */ 4 5 #include <stdio.h> 6 #include <stdlib.h> //提供函数 rand() 原型 7 8 #define NUM 40 9 10 void fillarray(double 阅读全文
posted @ 2018-07-03 14:05 web1013 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 1 /* 2 rect_pol.c -- 把直角坐标转换为极坐标 3 */ 4 5 #include <stdio.h> 6 #include <math.h> 7 8 #define RAD_TO_DEG (180 / (4 * atan(1.0))) 9 10 typedef struct po 阅读全文
posted @ 2018-07-03 10:50 web1013 阅读(259) 评论(0) 推荐(0) 编辑
摘要: 1 /* 2 predef.c -- 预定义宏和预定义标识符 3 */ 4 5 #include <stdio.h> 6 7 void why_me(void); 8 9 int main() 10 { 11 printf("The file is %s.\n", __FILE__); 12 pri 阅读全文
posted @ 2018-07-03 10:08 web1013 阅读(139) 评论(0) 推荐(0) 编辑