摘要: #include "stdafx.h"#include #include const int MAXN = 1000 + 10;int n, target[MAXN];int main(){ while(scanf_s("%d",&n,sizeof(n)) == 1) { ... 阅读全文
posted @ 2015-04-17 09:41 码农@163 阅读(141) 评论(0) 推荐(0) 编辑
摘要: #include "stdafx.h"#include #include const int MAXN = 50;int queue[MAXN];int main(){ int n,front,rear; scanf_s("%d",&n,sizeof(n)); for(int i ... 阅读全文
posted @ 2015-04-17 09:06 码农@163 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 1.局部变量通常在它所在的语句块结束的时候被释放。如果你不想释放某个局部变量,可以在局部变量上加上static进行声明2.C中有三种内存领域的寿命。q静态变量的寿命从程序运行时开始,到程序关闭时结束。q自动变量的寿命到声明该变量的语句块执行结束为止。q通过malloc()分配的领域的寿命到调用fre... 阅读全文
posted @ 2015-04-16 22:28 码农@163 阅读(237) 评论(0) 推荐(0) 编辑
摘要: 1,传递给函数的标量参数是传值调用的2.传递给函数的数组参数在行为上就像它们是通过传地址调用的那样3. ADT 可以限制函数和数据定义的作用域---黑盒设计3.限制对模块的访问时用过static 关键字的合理使用实现的,它可以限制对那些并非接口的函数和数据的访问4.递归的两个条件:1,存在限定条件 ... 阅读全文
posted @ 2015-04-16 11:47 码农@163 阅读(274) 评论(0) 推荐(0) 编辑
摘要: 1)求字符串长度 直接 while(*string++) 判断即可2)while((string = *string++) != NULL) a,把strings当前所指向 指针复制到变量string 中。 b,增加strings的值,使它指向下一个值 c.它测试string 是否为空。3) 阅读全文
posted @ 2015-04-14 23:21 码农@163 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 1 #include "stdafx.h" 2 #include 3 #include 4 #include 5 #define MAX_REMIND 50 6 #define MSG_LEN 60 7 int read_line(char str[],int n); 8 int main(... 阅读全文
posted @ 2015-04-14 15:54 码农@163 阅读(308) 评论(0) 推荐(0) 编辑
摘要: #include "stdafx.h"#include #include typedef struct stack{int data;struct stack *next;}STACK;STACK *head,*pr;int nodeNum = 0;STACK *Createnote(int num... 阅读全文
posted @ 2015-04-14 08:40 码农@163 阅读(143) 评论(0) 推荐(0) 编辑
摘要: #include "stdafx.h"#include #include #include #include typedef struct card{char suit[10];char face[10];}CARD;void Deal(CARD *wCard);void shuffle(CARD ... 阅读全文
posted @ 2015-04-13 23:01 码农@163 阅读(295) 评论(0) 推荐(0) 编辑
摘要: #include "stdafx.h"#include #include #include #define NUM_ELECTORATE 10#define NUM_CANDIDATE 3struct candicate{char name[20];int count;}candidate[3] =... 阅读全文
posted @ 2015-04-13 22:21 码农@163 阅读(155) 评论(0) 推荐(0) 编辑
摘要: #include "stdafx.h"#include #include #include void InputScore(int *p,int m,int n);int FindMax(int *p,int m,int n,int *pRow,int *pCol);int main(){int *... 阅读全文
posted @ 2015-04-13 21:02 码农@163 阅读(417) 评论(0) 推荐(0) 编辑