APP下载
首页
>
IT互联网
>
信息技术知识竞赛c语言
搜索
信息技术知识竞赛c语言
题目内容
(
单选题
)
已知
#int t=0;
while (t=1)
{...}
则以下叙述正确的是 ( )。

A、循环控制表达式的值为0

B、循环控制表达式的值为1

C、循环控制表达式不合法

D、以上说法都不对

答案:B

信息技术知识竞赛c语言
有以下程序
  #include
  int fun (int x,int y)
  { if (x!=y) return ((x+y)/2);
  else return (x);
  }
  main()
  { int a=4,b=5,c=6;
  printf("%d\n",fun(2*a,fun(b,c)));
  }
  程序运行后的输出结果是 ()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6090-c089-2897e0346523.html
点击查看题目
以下程序输出结果是 。
#include "stdio.h"
void f ();
main()
{int a;
for(a=1;a<=3;a++)
fun();
}
void fun()
{static int i=1;
i+=3;
printf("%2d",i);
}
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-54d8-c089-2897e0346513.html
点击查看题目
下列程序段的执行结果是输出( )。
x=3;
do

printf("%2d",x--);
} while(!x);
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-54d8-c089-2897e0346520.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++));
}
程序运行后的输出结果是()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6478-c089-2897e0346512.html
点击查看题目
已知
#int t=0;
while (t=1)
{...}
则以下叙述正确的是 ( )。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6478-c089-2897e0346520.html
点击查看题目
设有 int x=11; 则表达式 (x++ * 1/3) 的值是()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4920-c089-2897e034650f.html
点击查看题目
有以下程序
#include "stdio.h"
void main()
{ int x=0x02ff,y=0x0ff00;
printf("%d\n",(x&y)>>4|0x005f);
}
执行后的输出结果是( )。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6c48-c089-2897e034650e.html
点击查看题目
下列程序执行后的输出结果是()。
#define MA(x) x*(x-1)
main()
{
int a=1,b=2; printf("%d \n",MA(1+a+b));
}
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4d08-c089-2897e034650d.html
点击查看题目
有以下程序(说明:字母A的ASCII码值是65,
  #include
  void fun(char *s)
  { while(*s)
  { if(*s%2) printf("%c",*s);
  s++;
  }
  }
  void main()
  { char a[]="BYTE";
  fun(a); printf("\n");
  }
程序运行后的输出结果是 ( )。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6860-c089-2897e034650c.html
点击查看题目
设有以下宏定义:
#define N 3
#define Y(n) ( (N+1)*n)
则执行语句:z=2 * (N+Y(5+1));后,z的值为()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-58c0-c089-2897e0346502.html
点击查看题目
首页
>
IT互联网
>
信息技术知识竞赛c语言
题目内容
(
单选题
)
手机预览
信息技术知识竞赛c语言

已知
#int t=0;
while (t=1)
{...}
则以下叙述正确的是 ( )。

A、循环控制表达式的值为0

B、循环控制表达式的值为1

C、循环控制表达式不合法

D、以上说法都不对

答案:B

信息技术知识竞赛c语言
相关题目
有以下程序
  #include
  int fun (int x,int y)
  { if (x!=y) return ((x+y)/2);
  else return (x);
  }
  main()
  { int a=4,b=5,c=6;
  printf("%d\n",fun(2*a,fun(b,c)));
  }
  程序运行后的输出结果是 ()。

A. 3

B. 6

C. 8

D. 12

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6090-c089-2897e0346523.html
点击查看答案
以下程序输出结果是 。
#include "stdio.h"
void f ();
main()
{int a;
for(a=1;a<=3;a++)
fun();
}
void fun()
{static int i=1;
i+=3;
printf("%2d",i);
}

A. 4 7 10

B. 4 4 4

C. 4 5 6

D. 4 6 8

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-54d8-c089-2897e0346513.html
点击查看答案
下列程序段的执行结果是输出( )。
x=3;
do

printf("%2d",x--);
} while(!x);

A. 3 2 1

B. 3

C. 2 1

D. 2 1 0

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-54d8-c089-2897e0346520.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
点击查看答案
已知
#int t=0;
while (t=1)
{...}
则以下叙述正确的是 ( )。

A. 循环控制表达式的值为0

B. 循环控制表达式的值为1

C. 循环控制表达式不合法

D. 以上说法都不对

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6478-c089-2897e0346520.html
点击查看答案
设有 int x=11; 则表达式 (x++ * 1/3) 的值是()。

A. 3

B. 4

C. 11

D. 12

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4920-c089-2897e034650f.html
点击查看答案
有以下程序
#include "stdio.h"
void main()
{ int x=0x02ff,y=0x0ff00;
printf("%d\n",(x&y)>>4|0x005f);
}
执行后的输出结果是( )。

A. 127

B. 255

C. 128

D. 1

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6c48-c089-2897e034650e.html
点击查看答案
下列程序执行后的输出结果是()。
#define MA(x) x*(x-1)
main()
{
int a=1,b=2; printf("%d \n",MA(1+a+b));
}

A. 6

B. 8

C. 10

D. 12

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4d08-c089-2897e034650d.html
点击查看答案
有以下程序(说明:字母A的ASCII码值是65,
  #include
  void fun(char *s)
  { while(*s)
  { if(*s%2) printf("%c",*s);
  s++;
  }
  }
  void main()
  { char a[]="BYTE";
  fun(a); printf("\n");
  }
程序运行后的输出结果是 ( )。

A. BY

B. BT

C. YT

D. YE

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6860-c089-2897e034650c.html
点击查看答案
设有以下宏定义:
#define N 3
#define Y(n) ( (N+1)*n)
则执行语句:z=2 * (N+Y(5+1));后,z的值为()。

A. 出错

B. 42

C. 48

D. 54

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-58c0-c089-2897e0346502.html
点击查看答案
试题通小程序
试题通app下载