在以下给出的表达式中,与while(E)中的(E)不等价的表达式是()。
A. (!E==0)
B. (E>0‖E<0)
C. (E==0)
D. (E!=0)
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4d08-c089-2897e0346525.html
点击查看答案
有以下程序,若运行时从键盘输入:18,11<回车>,则程序的输出结果是( ) 。
main()
{ int a,b;
printf("Enter a,b:"); scanf("%d,%d",&a,&b);
while(a!=b)
{ while(a>b) a -= b;
while(b>a) b -= a;
}
printf("%3d%3d\n",a,b);
}
A. 1 1
B. 2 1
C. 2 2
D. 3 3
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6c48-c089-2897e0346514.html
点击查看答案
以下程序运行后的输出结果是( ) 。
#include
void fun(int x)
{if(x/5>0) fun(x/5);
printf(“%d”,x);
}
main()
{fun(11); printf(“\n”);}
A. 211
B. 212
C. 213
D. 214
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6478-c089-2897e034651a.html
点击查看答案
以下不合法的用户标识符是()。
A. j2_KEY
B. Double
C. 4d
D. _8_
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4d08-c089-2897e034651a.html
点击查看答案
若有以下程序段,输出结果是( )。
char s[ ]="\\141\141abc\t";
printf ("%d\n",strlen(s));
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-50f0-c089-2897e0346521.html
点击查看答案
有以下程序
#include
void main( )
{ int a=1,*p,**pp;
pp=&p;
p=&a;
a++;
printf ("%d,%d,%d\n", a,*p, **pp);
}
执行后的输出结果是( )。
A. 2,1,1
B. 2,1,2
C. 2,2,2
D. 1,1,1
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6860-c089-2897e034651f.html
点击查看答案
有以下程序
main()
{int a=0,b=0,c=0,d=0;
if(a=1) b=1;c=2;
else d=3;
printf("%d,%d,%d,%d\n",a,b,c,d);
}
程序输出()。
A. 0,1,2,0
B. 0,0,0,3
C. 1,1,2,0
D. 编译有错
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-58c0-c089-2897e0346511.html
点击查看答案
定义struct st
{int x;
float y;
double z;
} b;
则b是字节数 。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-54d8-c089-2897e0346511.html
点击查看答案
有以下程序
#include
int f(int m)
{static int n=0;
n+=m;
return n;
}
main()
{int n=0;
printf(“%d,”,f(++n));
printf(“%d\n”,f(n++));
}
程序运行后的输出结果是()。
A. 1,2
B. 1,1
C. 2,3
D. 3,3
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6478-c089-2897e0346512.html
点击查看答案
有以下程序
#include
Main()
{int a=1,b=0;
if(--a) b++;
else if(a==0) b+=2;
else b+=3;
printf(“%d\n”,b);
}
程序运行后的输出结果是()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6090-c089-2897e034651b.html
点击查看答案