03 2017 档案
第三次作业
摘要:#include int main() { int a[10]={0,1,2,3,4,5,6,7,8,9}; int *p=a; int fun(int *b); fun(a); } int fun(int *b) { int j; for(j=0;j<=9;j++) printf("%d ",*b+j); }
阅读全文
补充作业
摘要:#include int funstr(char str[]) {int i=0; str[0]='H'; str[6]='W'; while(str[i]!='\0') {printf("%c",str[i]); i++; } } int main() {char str[]="hello world"; printf("%s\n",str); funstr(str); return 0...
阅读全文
第二次作业
摘要:#include<stdio.h> main(){void swap(int*p1,int*p2);int a,b;int*c,*d;scanf("%d,%d",&a,&b);c=&a;d=&b;swap(c,d);printf("%d,%d\n",a,b); } void swap(int*p1,
阅读全文
第一次作业
摘要:#include<stdio.h>main(){int a[13]={1,2,3,4,5,6,7,8,9,10}; //定义数组 int *p; //定义指针变量 int i; //定义整形变量 p=a; //指针指向数组 for(i=0;i<10;i++) //循环输出数组的元素 printf("
阅读全文