更多“下面程序输出的结果是: #include <stdio.h>…”相关的问题
第1题
有以下程序 #include <stdio.h> #include <string.h> main() { char s[]="12345"; printf("%d,%d", strlen(s),sizeof(s)); } 执行后输出结果是( )。
A、赋初值的字符串有错
B、6,7
C、6,6
D、5,6
点击查看答案
第2题
#include <stdio.h> main() { char x=‘a’,y=‘b’; printf("%d\\%c\n",x,y); printf("x=\’%3d\’,y=\’%-3d\’\n",x,y); } 程序的运行结果为 。
点击查看答案
第3题
以下代码: <block wx:if="{{true}}"> <view> view1 </view> <view> view2 </view> </block> 的输出结果为( )
A、view1
B、view2
C、view1 和 view2
D、没有输出
点击查看答案
第4题
以下程序的输出结果: #include <stdio.h> union { struct { int x; int y; }s1; int a; int b; }u1; void main() { u1.a=3; u1.b=4; u1.s1.x=u1.a*u1.b; u1.s1.y=u1.a+u1.b; printf("%d,%d\n",u1.s1.x,u1.s1.y); }
点击查看答案
第5题
有以下程序#include<stdio.h>#include<string.h>main( ){char x[]=“STRING”;x[0]=0;
有以下程序
#include<stdio.h>
#include<string.h>
main( )
{char x[]=“STRING”;
x[0]=0;x[1]=’\0’;x[2]=’0’;
printf(”%d%d\n”,sizeof(x),strlen(x));
}
程序运行后的输出结果是( )。
A.6 1
B.7 0
C.6 3
D.7 1
点击查看答案
第6题
#include <stdio.h> extern serial_initial(); main() { int x,y,z; serial_initial(); printf("input data x, y ?\n"); scanf("%d %d",&x,&y); printf("\n x y !x x||y x&&y"); printf("\n%3d%3d",x,y); z=!y; printf("%5d",z); z=x||y; printf("%5d",z); z=x&&y; printf("%5d",z); printf("\n");printf("\n"); printf("That is all\n"); while(1); } _____________________________________________________________________________________________________________________
点击查看答案
第7题
以下程序的运行结果是______。 #include <stdio.h> void num() { extern int x,y; int a=15,b=10; x=a-b; y=a+b; } int x,y; int main() { int a=7,b=5; x=a+b; y=a-b; num(); printf("%d,%d",x,y); return 0; }
点击查看答案
第8题
4.以下程序运行结果是: #include <stdio.h> void main() { int x=35; char z='A'; int b; b=((x&15)&&(z<'a')); printf("%d ",b); }> A、0
点击查看答案
第9题
3.以下程序运行结果是: #include <stdio.h> void main() { int x=3,y=2,z=1; printf("%d ",x/y&~z); }
点击查看答案
第10题
编写程序,利用右移位运算,实现将十进制转化成二进制并输出。提示:用数组记录二进制。
点击查看答案