有以下程序#includevoid main(){ int a,b,d=25;a=d/10%9;b=a&&(-1);printf("%d,%d/n",a,b);}程序运行后的输出结果是()。
A.2,1
B.2,0
C.3,1
D.6,1
A.2,1
B.2,0
C.3,1
D.6,1
第1题
有以下程序: include <stdio.h> void f(int y,int *x) { y=y+ *x; *x=*x+y;} main() { int x=2,y=4; f(y,&x); printf("%d%d\n",x,Y); } 执行后的输出结果【 】。
第2题
以下程序运行后的输出结果是【 】。 include <stdio, h> include <stating, h> void fun(char * s,int p,int k) { int i; for(i=p;i<k-1;i++) s[i] =s[i+2]; } main() { char s [] = "abedefg"; fun(s,3 ,strlen(s) ); puts(s); }
第3题
以下程序运行后输出结果是【 】。 include <stdio, h> void swap(int x.int y) { int t; t = x;x = y;y = t: printf("% d % d ",x,y); } main () { iht a=3,b=4: swap(a,b); prinff("% d % d" ,a,b); }
第4题
以下程序的输出结果是【 】。 include <stdio.h> void fun() { static int a=0; a+=2;printf("%d",a); } main() { int cc; for(cc=1;cc<4;cc++)fun(); printf("\n"); }
第5题
下面程序的运行结果是()。 include<stdio.h> define_MYDEBUG void main() { ifdef_MYDEBUG printf("DEBUG"); else printf("RELEASE"); endif )
A.DEBUG
B.RELEASE
C.DEBUGRELEASE
D.程序有错误
第6题
以下程序的正确运行结果是()。 include<stdi0.h> void fun() { extern int x,y; int a=25,b=10; x=a—b; y=a+b; } int x,y; void main() { int a=8,b=4 ; x=a+b: y=a-b; fun(); printf(“%d,%d\n”,x,y); }
A.12,4
B.不确定
C.15,35
D.1,12
第7题
执行以下的C程序并用运行时环境解释其输出。 include<stdio.h> void g(void) { {int x; printf("%d\n",x); x:3;} {int y; printf("%d\n",y);) } int*f(void) { int x; printf("%d\n",x); return &x; } void main() { int*p; p=f(); *p=1; f(); g(); }
第8题
以下程序的输出结果是【 】。 include <stdio.h> void swap(int *a, int *b) { int *t; t=a; a=b; b=t; } main() { int i=3,j=5,*p=&i,*q=&j; swap(p,q); printf("%d %d\n",*p,*q); }
第9题
以下程序运行后的输出结果是______。
#include<stdio.h>
void ast(int x,int y,int*cp,int*dp)
{ *cp=x+y; *dp=x-y; }
main()
{int a=4,b=3,c,d;
ast(a,b,&c,&d);
printf("c=%d,d=%d\n",c,d);
}
第10题
以下程序的输出结果是______。 include <stdio.h> void swap(int *a, int *b) { int *t; t=a;a=b;b=t; } main() { int i=3,j=5,*p=&i,*q=&j; swap(p,q); printf("%d %d\n",*p,*q); }
第11题
以下程序运行后的输出结果是【 】。 include<string.h> void fun(char *s,int p,int k) { int i; for(i=p;i<k-1;i++)s[i]=s[i+2]; } main() { char s[]="abcdefg"; fun(s,3,strlen(s));puts(s); }