下面程序的运行结果是()。#includemain(){inta=10,b=20,s,t,m,*pa,*pb;pa=&a;pb=&b;s=*pa+*pb;t=*pa-*pb;m=(*pa)*(*pb);printf("s=%d\nt=%d\nm=%d\n",s,t,m);}
查看答案
下面程序的运行结果是()。#includevoidmain(){char*p1,*p2;p1=p2="abcde";while(*p2!='\0')putchar(*p2++);while(--p2>=p1)putchar(*p2);putchar('\n');getchar();}
下面程序的运行结果是()。#includevoidswap(char*x,char*y){chart;t=*x;*x=*y;*y=t;}voidmain(){chars1[]="abc",s2[]="123";char*p1=s1,*p2=s2;swap(p1,p2);printf("%s,%s",s1,s2);}
下面程序的运行结果是()。#includevoidf(int*p){*p=*p+3;}voidmain(){inta[5]={50,40,30,20,10},*p;p=a;f(p);printf("%d",*p);}
在空格处填上语句,以实现字符串复制的功能。main(){char*ps="Clanguage";charstr[15];char*p1,*p2;p1=ps;p2=str;while(*p1!='\0'){①;②;p2++;}*p2='\0';printf("ps=%s\n",ps);printf("str=%s\n",str);}