现在的位置: 首页 > 综合 > 正文

c语言指针问题

2013年09月21日 ⁄ 综合 ⁄ 共 300字 ⁄ 字号 评论关闭

 

#include "stdafx.h"
#include "stdio.h"

void pcopy(char *s,char *d)
{
 while((*d++=*s++));              //这句写的不错
}
int main(int argc, char* argv[])
{
    char a[128]="i am a  good student";
 char b[128]="you are a good girl";
 char *point1,*point2;
 point1=a;
 point2=b;
 pcopy(point1,point2);
 
 printf("the array[b]:%s/n",b);
 return 0;
}

 

抱歉!评论已关闭.