赞题库-背景图
单项选择题

有如下程序: #include <stdio.h> main() { int a=8,b; b = (a>>2)%2; printf("%d,%d\n",a,b); } 程序运行后的输出结果是______。

A.8,0
B.4,0
C.4,1
D.8,1
<上一题 目录 下一题>
热门试题

单项选择题有如下程序: #include <stdio.h> struct pair { int first,second; }; struct pair get_min_max(int* array,int len) { int i; struct pair res; res.first=array[0]; res.second=array[0]; for(i=1;i<len; i++) { if(array[i]<res.first) res.first=array[i]; if(array[i]>res.second) res.second=array[i]; } return res; main() { int array[5]={9,1,3,4}; struct pair min_max=get_min_max(array,5); printf( min=%d,max=%d n ,min_max.first,min_max.second); } 程序运行后的输出结果是______。

A.min=1,max=9
B.min=0,max=9
C.min=1,max=4
D.min=0,max=4

单项选择题有如下程序: #include <stdio.h> struct person { char name[10]; int age; } main() { struct person room[4]={{ Zhang ,19},{’Li’,20},{ Wang ,17},{ Zhao ,18}}; printf( %s;%d n ,(room+2)->name,room->age); } 程序运行后的输出结果是______。

A.Wang:19
B.Wang:17
C.Li:20
D.Li:19