试题通
试题通
APP下载
首页
>
IT互联网
>
信息技术知识竞赛c语言
试题通
搜索
信息技术知识竞赛c语言
题目内容
(
单选题
)
设X,Y,Z和K是int型变量,则执行表达式:X=(Y=4,Z=16,K=32)
后,X的值为()。

A、4

B、16

C、32

D、52

答案:C

试题通
信息技术知识竞赛c语言
试题通
有以下程序段
  #include
  main()
  { …
  while( getchar()!='\n');
  …
  }
  以下叙述中正确的是( )。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-54d8-c089-2897e0346500.html
点击查看题目
以下叙述中不正确的是()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-50f0-c089-2897e034650d.html
点击查看题目
执行下列程序后,i的值是()。
int i,x;
for(i=1,x=1;i<20; i++)
{if (x>=10) break;
if(x%2= =1)
{x+=5; continue; }
x-=3;
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-54d8-c089-2897e0346521.html
点击查看题目
以下语句中存在语法错误的是()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-50f0-c089-2897e034650a.html
点击查看题目
有以下程序
#include "stdio.h"
#include "string.h"
void main( )
{ char s1[50]={"some string *"},s2[]={"test"};
printf("%s\n", strcat(s1,s2));
}
执行后的输出结果是( )。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6860-c089-2897e0346511.html
点击查看题目
若变量已正确定义,有以下程序段
int a=3,b=5,c=7;
if(a>b) a=b; c=a;
if(c!=a) c=b;
printf("%d,%d,%d\n",a,b,c);
其输出结果是( )。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-54d8-c089-2897e0346506.html
点击查看题目
有以下程序
main()
{int k=5,n=0;
do
{switch(k)
{case 1: case 3:n+=1; break;
default:n=0;k--;
case 2: case4:n+=2;k--;break;}
printf(“%d”,n);
}while(k>0&&n<5);}
程序运行后的输出结果是()
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-5ca8-c089-2897e0346507.html
点击查看题目
有以下程序
#include "stdio.h"
void change(int k[ ]){ k[0]=k[5]; }
void main()
{ int x[10]={1,2,3,4,5,6,7,8,9,10},n=0;
while( n<=4 ) { change( &x[n]) ; n++; }
for(n=0; n<5; n++) printf("%d ",x[n]);
printf("\n");
}
程序运行后输出的结果是( )。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6c48-c089-2897e0346515.html
点击查看题目
#include
void disp(char *string)
{
if(*string)
{
disp( string+1);
putchar (*string);
}
}
void main()
{
disp("abcdefg");
}
程序的运行结果是( )。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6860-c089-2897e0346506.html
点击查看题目
以下叙述中错误的是()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-50f0-c089-2897e0346504.html
点击查看题目
首页
>
IT互联网
>
信息技术知识竞赛c语言
题目内容
(
单选题
)
手机预览
试题通
信息技术知识竞赛c语言

设X,Y,Z和K是int型变量,则执行表达式:X=(Y=4,Z=16,K=32)
后,X的值为()。

A、4

B、16

C、32

D、52

答案:C

试题通
试题通
信息技术知识竞赛c语言
相关题目
有以下程序段
  #include
  main()
  { …
  while( getchar()!='\n');
  …
  }
  以下叙述中正确的是( )。

A. 此while语句将无限循环

B. getchar()不可以出现在while语句的条件表达式中

C. 当执行此while语句时,只有按回车键程序才能继续执行

D. 当执行此while语句时,按任意键程序就能继续执行

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-54d8-c089-2897e0346500.html
点击查看答案
以下叙述中不正确的是()。

A. 在C中,函数中的自动变量可以赋初值,每调用一次,赋一次初值。

B. 在C中,在调用函数时,实在参数和对应形参在类型上只需赋值兼容。

C. 在C中,外部变量的隐含类别是自动存储类别。

D. 在C中,函数形参可以说明为register变量。

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-50f0-c089-2897e034650d.html
点击查看答案
执行下列程序后,i的值是()。
int i,x;
for(i=1,x=1;i<20; i++)
{if (x>=10) break;
if(x%2= =1)
{x+=5; continue; }
x-=3;

A. 4

B. 5

C. 6

D. 7

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-54d8-c089-2897e0346521.html
点击查看答案
以下语句中存在语法错误的是()。

A. char ss[6][20];ss[1]= "right? ";

B. char ss[][20]={ "right? "};

C. char *ss[6];ss[1]= "right? ";

D. char *ss[]={"right? "};

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-50f0-c089-2897e034650a.html
点击查看答案
有以下程序
#include "stdio.h"
#include "string.h"
void main( )
{ char s1[50]={"some string *"},s2[]={"test"};
printf("%s\n", strcat(s1,s2));
}
执行后的输出结果是( )。

A. some string

B. test

C. some stritest

D. some string *test

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6860-c089-2897e0346511.html
点击查看答案
若变量已正确定义,有以下程序段
int a=3,b=5,c=7;
if(a>b) a=b; c=a;
if(c!=a) c=b;
printf("%d,%d,%d\n",a,b,c);
其输出结果是( )。

A. 程序段有语法错

B. 3,5,3

C. 3,5,5

D. 3,5,7

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-54d8-c089-2897e0346506.html
点击查看答案
有以下程序
main()
{int k=5,n=0;
do
{switch(k)
{case 1: case 3:n+=1; break;
default:n=0;k--;
case 2: case4:n+=2;k--;break;}
printf(“%d”,n);
}while(k>0&&n<5);}
程序运行后的输出结果是()

A. 2345

B. 235

C. 23456

D. 2356

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-5ca8-c089-2897e0346507.html
点击查看答案
有以下程序
#include "stdio.h"
void change(int k[ ]){ k[0]=k[5]; }
void main()
{ int x[10]={1,2,3,4,5,6,7,8,9,10},n=0;
while( n<=4 ) { change( &x[n]) ; n++; }
for(n=0; n<5; n++) printf("%d ",x[n]);
printf("\n");
}
程序运行后输出的结果是( )。

A. 6 7 8 9 10

B. 1 3 5 7 9

C. 1 2 3 4 5

D. 6 2 3 4 5

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6c48-c089-2897e0346515.html
点击查看答案
#include
void disp(char *string)
{
if(*string)
{
disp( string+1);
putchar (*string);
}
}
void main()
{
disp("abcdefg");
}
程序的运行结果是( )。

A. abcdefg

B. gfedcba

C. abcd

D. dcba

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6860-c089-2897e0346506.html
点击查看答案
以下叙述中错误的是()。

A. C程序中的#include和#define行均不是C语句

B. 除逗号运算符外,赋值运算符的优先级最低

C. C程序中,j++;是赋值语句

D. C程序中,+、-、*、/、%号是算术运算符,可用于整型和实型数的运算

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