06 2011 档案

摘要:此次案例注重讲解:指针数组、数组指针以及函数指针的应用。有一点难度,需要只需琢磨!代码如下: 1 /* 2 @author zengweilin 3 @2011/6/16 指针的应用举例 4 @notice:声明在C语言函数中只能放在开头,切记!!! 5 */ 6 #include "stdio.h" 7 #include "stdlib.h" 8 /*返回指向函数的指针*/ 9 int* fun(int a){10 return &a;11 }12 int main(){13 /*<1>*/14 int *a=fun(10);15 阅读全文
posted @ 2011-06-19 23:14 KISS's blog 阅读(1158) 评论(5) 推荐(1)
摘要:1 /* 2 @author zengweilin 3 @2011/6/13 万年历 4 */ 5 #include "stdio.h" 6 #include "stdlib.h" 7 int isLeapYear(int); 8 int main(){ 9 /* i 月份前的空格数目, 10 year 用户输入的年份, 11 day 当前月份的天数, 12 year_start 循环小于year年份的变量, 13 per_year_day 年天数(区分闰年与非闰年), 14 */ 15 int i,year,day=1,year_start=0,per 阅读全文
posted @ 2011-06-17 23:10 KISS's blog 阅读(469) 评论(1) 推荐(1)
摘要:1 /* 2 @2011/6/14 螺旋方阵 3 @author zengweilin 4*/ 5 #include "stdio.h" 6 #include "stdlib.h" 7 8 void widdershins(int); 9 void deasil(int); 10 11 int main(){ 12 int n; 13 printf("please input the value of n: "); 14 scanf("%d",&n); 15 while(n<=0) 16 { 17 p 阅读全文
posted @ 2011-06-17 22:09 KISS's blog 阅读(1073) 评论(2) 推荐(0)