单项选择题

有以下程序:
#include <stdio.h>
main()
int a=5,b=1,t;
t=(a<<2)|b;printf("%d\n",t);

程序运行后的输出结果是()

A、21
B、11
C、6
D、1

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

单项选择题
有以下程序: #include <stdio.h> #include <string.h> main() char str[][20]= One * World , One * Dream! ,*p=str[1]; printf( %d, ,strlen(p));printf( %s n ,p); 程序运行后的输出结果是

A、 9,One * World
B、 9,One * Dream!
C、 10,One * Dream!
D、 10,One * World

单项选择题
阅读下列程序,当运行函数时,输入abc de fg z10,则输出为 #include <stdio.h> #include <ctype.h> #include <string.h> int fun (char *str) int i,j=0; for(i=0;str[i]!=' 0';i++) if(str[i]!='') str[j++]=str[i]; str[j]=' 0'; main() char str[81]; int n; printf( Input a string: ); gets(str); puts(str); fun(str); printf( %s n ,str);

A、 abc
B、 z10
C、 abc de fg z10
abcdefgz10
D、 abc de fg z10

相关试题
  • 有以下程序: #define f(x) (x*x)...
  • 设变量已正确定义并赋值,以下正确的表达式...
  • 有以下程序: void sort(int a[],in...
  • 下面的函数调用语句含有实参的个数为() ...
  • 有定义语句:char s[10];,若要从终...