单项选择题

以下程序的功能是进行位运算:
main()
{unsigned char a,b;
a=7∧3;b=~4 & 3;
printf("%d%d\n",a,B) ;
}
程序运行后的输出结果是()

A.4 3
B.7 3
C.7 0
D.4 0

<上一题 目录 下一题>
热门 试题

单项选择题
有以下程序: #include <string.h> main() {char p[]={a,b,c},q[10]={a,b,c}; printf( %d%d n ,strlen(p),strlen(q)); } 以下叙述中正确的是()

A.在给p和q数组置初值时,系统会自动添加字符串结束符,故输出的长度都为3
B.由于p数组中没有字符串结束符,长度不能确定;但q数组中字符长度为3
C.由于q数组中没有字符串结束符,长度不能确定:但p数组中字符长度为3
D.由于p和q数组中没有字符串结束符,故长度都不能确定

单项选择题
有以下程序: void sum(int a[]) { a[0]=a[-1]+a[1]; } main() {int a[10]={1,2,3,4,5,6,7,8,9,10}; sum(&a[2]); printf( %d n ,a[2]); } 程序运行后的输出结果是()

A.6
B.7
C.5
D.8

相关试题
  • 有以下程序: struct STU {char name...
  • 有以下程序: #include <stdio.h> m...
  • 有以下程序: int a=2; int f(int...
  • 有以下程序: #include <strino.h> ...
  • 有以下程序: #include <string.h> ...