1、#include #include main()double *s,*p,a;int n,i;scanf(“%d“,s=(double*)Malloc(n*sizeof(double);if (s=NULL)printf(“内存不足 “);exit(0);for (i=0;ivoid swap(int a,int b)int t;t=a;a=b;b=t;main()int x=3,y=5;swap(x,y);printf(“%d %dn“,x,y);#includevoid swap(int *a,int *b)int t;t=*a;*a=*b;*b=t;main()int x=3,y=5;s
2、wap(printf(“%d %dn“,x,y);#includeint Mystrlen(char *s)int n;for(n=0;*s!=0;n+,s+);return n;main()int m;char st=“abcde“;m=Mystrlen(st);printf(“%dn“,m);#include#includechar *Delchar(char *s,char c)char *p1,*p2;p1=s;while (*p1!=0)if(*p1=c) break;p1+;for(p1=p2;p1#includechar *Delchar(char *s,char c)char *p1,*p2;p1=s;while (*p1!=0)if(*p1=c) break;p1+;if(*p1=0)return NULL;p2=p1;p2+;*p1=*p2;return s;main()char st=“abc1xyz“;char c=1;printf(“%s“,Delchar(st,c);5.2.1#includevoid main()int a2=0,i,j,k=2;for(i=0;ivoid main()int a6,i;for(i=1;i6;i+)ai=6*(i-1*(i/3)%5;printf(“%2d“,ai);