07 2010 档案

摘要:c 代码:#include stdio.h#include assert.h#define MAXLEN 1000int getline(char[] ,int);//供C# 调用 __declspec__declspec(dllexport) void reverseline(char dest[],const char source[]);int main(int argc, char *argv[]){ char currentline[MAXLEN]; int maxcount=0; int currentlen=0; char resultline[MAXLEN]; whil 阅读全文
posted @ 2010-07-28 12:00 b0b0 阅读(1585) 评论(1) 推荐(0)
摘要:返回 局部变量的地址代码1:#include stdio.h#define N 5int * sum(int a ,int b){ int result=a+b; return &result;}int * getarray(int array[]){ int i=0; for(i=0;iN;i++) { array[i]=array[i]*10; } return array;}int main(int argc, char *argv[]){ int i=0; int a=3,b=5; printf("\n %d+%d=%d \n",a,b,*sum(a,b)); int arra 阅读全文
posted @ 2010-07-23 10:23 b0b0 阅读(701) 评论(0) 推荐(0)