
帮帮小妹吧,谢谢你们!
6.读程序写出程序执行结果#include<stdio.h>#defineS(x)x*xvoidmain(){inta,k=3,m=1;a=S(k+m);printf("...
6.
读程序写出程序执行结果
#include <stdio.h>
#define S(x) x*x
void main()
{ int a,k=3,m=1;
a=S(k+m);
printf("%d",a);
}
7.
读程序写出程序执行结果
#include <stdio.h>
void main()
{ int a=1,b=3,c=5,d=4,x=3;
if(a<b)
if(c>d) x=1;
else if(a<c)
if(b>d)x=2;
else x=0;
printf(“%d\n”,x);
}
8.
读程序写出程序执行结果
#include <stdio.h>
void main()
{ int n1,n2,s=0;
n2=135;
while(n2!=0)
{ n1=n2%10;
s+=n1;
n2=n2/10;
}
printf("%d",s);
}
9.
读程序写出程序执行结果
#include <stdio.h>
int stre(char *s)
{ int num=0;
while(*(s+num)!= '\0’)num++;
return num;
}
void main()
{ char str[]=“students”,*p=str;
printf(“%s,%d\n”,p,stre(p)); }
10.
读程序写出程序执行结果
#include <stdio.h>
void swap(int b[])
{ int *p,*p1,*p2;
p1=&b[0] ;p2=&b[1];
p=p1; p1=p1+1; p2=p;
}
void main()
{ int a[]={5,9};
printf("%d,%d\n",*a,*(a+1));
swap(a);
printf("%d,%d\n",a[0],a[1]);
} 展开
读程序写出程序执行结果
#include <stdio.h>
#define S(x) x*x
void main()
{ int a,k=3,m=1;
a=S(k+m);
printf("%d",a);
}
7.
读程序写出程序执行结果
#include <stdio.h>
void main()
{ int a=1,b=3,c=5,d=4,x=3;
if(a<b)
if(c>d) x=1;
else if(a<c)
if(b>d)x=2;
else x=0;
printf(“%d\n”,x);
}
8.
读程序写出程序执行结果
#include <stdio.h>
void main()
{ int n1,n2,s=0;
n2=135;
while(n2!=0)
{ n1=n2%10;
s+=n1;
n2=n2/10;
}
printf("%d",s);
}
9.
读程序写出程序执行结果
#include <stdio.h>
int stre(char *s)
{ int num=0;
while(*(s+num)!= '\0’)num++;
return num;
}
void main()
{ char str[]=“students”,*p=str;
printf(“%s,%d\n”,p,stre(p)); }
10.
读程序写出程序执行结果
#include <stdio.h>
void swap(int b[])
{ int *p,*p1,*p2;
p1=&b[0] ;p2=&b[1];
p=p1; p1=p1+1; p2=p;
}
void main()
{ int a[]={5,9};
printf("%d,%d\n",*a,*(a+1));
swap(a);
printf("%d,%d\n",a[0],a[1]);
} 展开
2个回答
展开全部
14
0
9
student,8
{
5,9
5,9
}
都是自己算的啊
给个辛苦分呗~~
0
9
student,8
{
5,9
5,9
}
都是自己算的啊
给个辛苦分呗~~
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询