APP下载
首页
>
IT互联网
>
信息技术知识竞赛c语言
搜索
信息技术知识竞赛c语言
题目内容
(
单选题
)
C语言中,形参缺省的存储类别是()。

A、auto(自动)

B、static(静态)

C、register(寄存器)

D、extern(外部)

答案:A

信息技术知识竞赛c语言
#include
main()
{
char a1,a2,a3,a4,a5,a6;
scanf(“%c%c%c%c”,&a1,&a2,&a3,&a4);
a5=getchar();
a6=getchar();
putchar(a1);
putchar(a2);
printf(“%c%c\n”,a5,a6);
}如:123回车
45678回车 结果是( )。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-54d8-c089-2897e034650f.html
点击查看题目
有以下程序
  #include
  main()
  { int x;
  scanf("%d",&x);
  if(x>15) printf("%d",x-5);
  if(x>10) printf("%d",x);
  if(x>5) printf("%d\n",x+5);
  }
  若程序运行时从键盘输入12<回车>,则输出结果为( )。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6478-c089-2897e0346506.html
点击查看题目
有以下程序
#include "stdio.h"
main()
{ int a,b,c=246;
a=c/100%9;
b=(-1)&&(-1);
printf("%d,%d\n",a,b);
}
输出结果是()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-5ca8-c089-2897e0346515.html
点击查看题目
设整型变量a为5,使b不为2的表达式是( )。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-54d8-c089-2897e034651b.html
点击查看题目
有以下程序
#include "stdio.h"
#include
void main()
{ float x,y,z;
scanf("%f,%f",&x,&y);
z=x/y;
while(1)
{ if(fabs(z)>1.0)
{ x=y;
y=z;
z=x/y;
}
else break;
}
printf("%f\n",y);
}
通过键盘输入3.6,2.4,执行后的输出结果是( )。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6c48-c089-2897e0346506.html
点击查看题目
C语言中数组下标的下限是()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4d08-c089-2897e0346518.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
点击查看题目
有以下程序
#include “stdio.h”
fun(int x, int y){ return (x+y); }
void main()
{ int a=1, b=2, c=3, sum;
sum=fun((a++,b++,a+b),c++);
printf("%d\n",sum);
}
执行后的输出结果是( )。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6c48-c089-2897e0346511.html
点击查看题目
有以下程序
#include "stdio.h"
void main()
{ int x=1,y=0,a=0,b=0;
switch(x)
{ case 1: switch(y)
{ case 0: a++;break;
case 1: b++;break;
}
case 2: a++;b++;break;
}
printf("a=%d,b=%d\n",a,b);
}
执行后的输出结果是( )。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6c48-c089-2897e0346509.html
点击查看题目
有以下函数
int fun(char *x,char *y)
{ int n=0;
while((*x==*y)&&*x!=’\0’) {x++;y++;n++;}
return n;
}
函数的功能是()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6478-c089-2897e0346510.html
点击查看题目
首页
>
IT互联网
>
信息技术知识竞赛c语言
题目内容
(
单选题
)
手机预览
信息技术知识竞赛c语言

C语言中,形参缺省的存储类别是()。

A、auto(自动)

B、static(静态)

C、register(寄存器)

D、extern(外部)

答案:A

信息技术知识竞赛c语言
相关题目
#include
main()
{
char a1,a2,a3,a4,a5,a6;
scanf(“%c%c%c%c”,&a1,&a2,&a3,&a4);
a5=getchar();
a6=getchar();
putchar(a1);
putchar(a2);
printf(“%c%c\n”,a5,a6);
}如:123回车
45678回车 结果是( )。

A. 1267

B. 1256

C. 1278

D. 1245

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-54d8-c089-2897e034650f.html
点击查看答案
有以下程序
  #include
  main()
  { int x;
  scanf("%d",&x);
  if(x>15) printf("%d",x-5);
  if(x>10) printf("%d",x);
  if(x>5) printf("%d\n",x+5);
  }
  若程序运行时从键盘输入12<回车>,则输出结果为( )。

A. 7

B. 1217

C. 12

D. 17

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6478-c089-2897e0346506.html
点击查看答案
有以下程序
#include "stdio.h"
main()
{ int a,b,c=246;
a=c/100%9;
b=(-1)&&(-1);
printf("%d,%d\n",a,b);
}
输出结果是()。

A. 2,1

B. 3,2

C. 4,3

D. 2,-1

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-5ca8-c089-2897e0346515.html
点击查看答案
设整型变量a为5,使b不为2的表达式是( )。

A. b=a/2

B. b=6-(--a)

C. b=a%2

D. b=a>3?2:1

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-54d8-c089-2897e034651b.html
点击查看答案
有以下程序
#include "stdio.h"
#include
void main()
{ float x,y,z;
scanf("%f,%f",&x,&y);
z=x/y;
while(1)
{ if(fabs(z)>1.0)
{ x=y;
y=z;
z=x/y;
}
else break;
}
printf("%f\n",y);
}
通过键盘输入3.6,2.4,执行后的输出结果是( )。

A. 1.5

B. 1.6

C. 2

D. 2.4

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6c48-c089-2897e0346506.html
点击查看答案
C语言中数组下标的下限是()。

A. 1

B. 0

C. 视具体情况而定

D. 无固定下限

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4d08-c089-2897e0346518.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
点击查看答案
有以下程序
#include “stdio.h”
fun(int x, int y){ return (x+y); }
void main()
{ int a=1, b=2, c=3, sum;
sum=fun((a++,b++,a+b),c++);
printf("%d\n",sum);
}
执行后的输出结果是( )。

A. 6

B. 7

C. 8

D. 9

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6c48-c089-2897e0346511.html
点击查看答案
有以下程序
#include "stdio.h"
void main()
{ int x=1,y=0,a=0,b=0;
switch(x)
{ case 1: switch(y)
{ case 0: a++;break;
case 1: b++;break;
}
case 2: a++;b++;break;
}
printf("a=%d,b=%d\n",a,b);
}
执行后的输出结果是( )。

A. a=2,b=1

B. a=1,b=1

C. a=1,b=0

D. a=2,b=2

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6c48-c089-2897e0346509.html
点击查看答案
有以下函数
int fun(char *x,char *y)
{ int n=0;
while((*x==*y)&&*x!=’\0’) {x++;y++;n++;}
return n;
}
函数的功能是()。

A. 查找x和y所指字符串中是否有’\0’

B. 统计x和y所指字符串中最前面连续相同的字符个数

C. 将y所指字符串赋给x所指存储空间

D. 统计x和y所指字符串中相同的字符个数

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