APP下载
首页
>
IT互联网
>
信息技术知识竞赛c语言
搜索
信息技术知识竞赛c语言
题目内容
(
单选题
)
设x、y、t均为int型变量,则执行语句:x=y=3;t=++x||++y;后,y的值为()。

A、不定值

B、4

C、3

D、1

答案:C

信息技术知识竞赛c语言
有以下程序
  #include
  main()
  { char b,c; int i;
  b='a'; c='A';
  for(i=0;i<6;i++)
  { if(i%2) putchar(i+b);
  else putchar(i+c);
  } printf("\n");
  }
程序运行后的输出结果是( )。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6090-c089-2897e034651e.html
点击查看题目
以下有关switch语句的正确说法是()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-50f0-c089-2897e034651c.html
点击查看题目
C语言中文件的存取方式是()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4d08-c089-2897e0346517.html
点击查看题目
若有说明语句:double *p,a;则能通过scanf语句正确给输入项读入数据的程序段是()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4d08-c089-2897e0346528.html
点击查看题目
若有定义语句:double a,*p=&a;以下叙述中错误的是()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-54d8-c089-2897e0346504.html
点击查看题目
有以下程序
#include
void main()
{ char *alpha[7]={"ABCD","EFGH","IJKL","MNOP","QRST","UVWX","YZ"};
char **p;
int i;
p=alpha;
for(i=0;i<4;i++)
printf("%c",*(p[i]));
printf("\n");
}
执行后的输出结果是( )。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6860-c089-2897e0346520.html
点击查看题目
以下所列的各函数首部中,正确的是()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-50f0-c089-2897e0346522.html
点击查看题目
有以下程序
  #include
  main()
  { int x=1,y=0;
  if(!x) y++;
  else if(x==0)
  if (x) y+=2;
  else y+=3;
  printf("%d\n",y);
  }
  程序运行后的输出结果是()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6090-c089-2897e034651f.html
点击查看题目
阅读下面的程序,运行结果是()。
main()
{
char *str="ABCabcd";
bubble(str,5);
printf("\n%s",str);
}

bubble(str,count)
char *str;
int count;
{
int i,j=count;
char tmp;
while(j-->1)
for(i=0;i if(str[i] {
tmp=str[i];
str[i]=str[i+1];
str[i+1]=tmp;
}
}
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-5ca8-c089-2897e0346517.html
点击查看题目
#include "stdio.h"
void main()
{
int a=2,i=0,tn=0,sn=0;
while(i<3)
{
tn=tn+a;
sn=sn+tn;
a=a*10;
i++;
}
printf("%d",sn);
}
程序的运行结果是( )。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6860-c089-2897e0346505.html
点击查看题目
首页
>
IT互联网
>
信息技术知识竞赛c语言
题目内容
(
单选题
)
手机预览
信息技术知识竞赛c语言

设x、y、t均为int型变量,则执行语句:x=y=3;t=++x||++y;后,y的值为()。

A、不定值

B、4

C、3

D、1

答案:C

信息技术知识竞赛c语言
相关题目
有以下程序
  #include
  main()
  { char b,c; int i;
  b='a'; c='A';
  for(i=0;i<6;i++)
  { if(i%2) putchar(i+b);
  else putchar(i+c);
  } printf("\n");
  }
程序运行后的输出结果是( )。

A. ABCDEF

B. AbCdEf

C. aBcDeF

D. abcdef

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6090-c089-2897e034651e.html
点击查看答案
以下有关switch语句的正确说法是()。

A. break语句是语句中必须的一部分

B. 在switch 语句中可以根据需要使用或不使用break语句

C. break语句在switch 语句中不可以使用

D. 在switch 语句中的每一个case都要用break语句

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-50f0-c089-2897e034651c.html
点击查看答案
C语言中文件的存取方式是()。

A. 顺序存取

B. 随机存取

C. 顺序存取,随机存取均可

D. 顺序存取,随机存取均不可

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4d08-c089-2897e0346517.html
点击查看答案
若有说明语句:double *p,a;则能通过scanf语句正确给输入项读入数据的程序段是()。

A. *p=a;
scanf("%1f",p);

B. *p=a;
scanf("%f",p);

C. p=a;
scanf("%1f",*p);

D. p=&a;
scanf("%1f",p);

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4d08-c089-2897e0346528.html
点击查看答案
若有定义语句:double a,*p=&a;以下叙述中错误的是()。

A. 定义语句中的*号是一个间址运算符

B. 定义语句中的*号只是一个说明符

C. 定义语句中的p只能存放double类型变量的地址

D. 定义语句中,*p=&a把变量a的地址作为初值赋给指针变量p

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-54d8-c089-2897e0346504.html
点击查看答案
有以下程序
#include
void main()
{ char *alpha[7]={"ABCD","EFGH","IJKL","MNOP","QRST","UVWX","YZ"};
char **p;
int i;
p=alpha;
for(i=0;i<4;i++)
printf("%c",*(p[i]));
printf("\n");
}
执行后的输出结果是( )。

A. AEIM

B. BFJN

C. ABCD

D. DHLP

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6860-c089-2897e0346520.html
点击查看答案
以下所列的各函数首部中,正确的是()。

A. void play(var a:integer,var b:integer)

B. void play(int a,b)

C. void play(int a,int b)

D. sub play(a as integer,b as integer)

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-50f0-c089-2897e0346522.html
点击查看答案
有以下程序
  #include
  main()
  { int x=1,y=0;
  if(!x) y++;
  else if(x==0)
  if (x) y+=2;
  else y+=3;
  printf("%d\n",y);
  }
  程序运行后的输出结果是()。

A. 3

B. 2

C. 1

D. 0

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6090-c089-2897e034651f.html
点击查看答案
阅读下面的程序,运行结果是()。
main()
{
char *str="ABCabcd";
bubble(str,5);
printf("\n%s",str);
}

bubble(str,count)
char *str;
int count;
{
int i,j=count;
char tmp;
while(j-->1)
for(i=0;i if(str[i] {
tmp=str[i];
str[i]=str[i+1];
str[i+1]=tmp;
}
}

A. bacdCBA

B. baCBAcd

C. cdbaCBA

D. bCBAacd

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-5ca8-c089-2897e0346517.html
点击查看答案
#include "stdio.h"
void main()
{
int a=2,i=0,tn=0,sn=0;
while(i<3)
{
tn=tn+a;
sn=sn+tn;
a=a*10;
i++;
}
printf("%d",sn);
}
程序的运行结果是( )。

A. 2 4 8

B. 246

C. 2
4
6

D. 234

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