早教吧 育儿知识 作业答案 考试题库 百科 知识分享

写出以下程序的输出结果.1.#includevoidmain(void){charstr[]="xyz",*ps=str;while(*ps)ps++;for(ps--;ps-str>=0;ps--)putchar(*ps);}2.#includevoidf(int*a,intb){(*a)++;b++;}voidmain(void){inta=3,b=5;f(&a,b)

题目详情
写出以下程序的输出结果.
1.
#include
void main(void)
{
char str[]="xyz",*ps=str;
while(*ps ) ps++;
for(ps--; ps-str>=0; ps--) putchar(*ps);
}
2.
#include
void f(int *a, int b)
{
(*a)++;
b++;
}
void main(void )
{
int a=3, b=5;
f (&a, b);
printf("a=%d,b=%d\n", a, b );
}
3.
#include
void main(void)
{
int x[7]={2,3,4,5,6,7,8};
int i=0,a=0;
while(i
▼优质解答
答案和解析
输出结果:
第1题:zyx
第2题:a=4,b=5
第3题:a=15
第4题:*2*4*
第5题: 2 5 8 10 25
第6题:1021 1008
你可以直接用c++软件运行就会出来结果的