试题通
试题通
APP下载
首页
>
IT互联网
>
信息技术知识竞赛c语言
试题通
搜索
信息技术知识竞赛c语言
题目内容
(
单选题
)
设ch是char型变量,其值为A,且有下面的表达式:
ch=(ch>='A'&&ch<='Z')?(ch+32):ch 的值是()。

A、A

B、a

C、Z

D、z

答案:B

试题通
信息技术知识竞赛c语言
试题通
若有定义语句:double a,*p=&a;以下叙述中错误的是()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-54d8-c089-2897e0346504.html
点击查看题目
如果程序中用到标准库函数log(),那么该程序应含下面哪条语句( )。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-54d8-c089-2897e034650e.html
点击查看题目
有以下程序
#include
void main()
{
int j,a[]={1,3,5,7,9,11,13,15},*p=a+5;
for(j=3;j;j--)
{
switch(j)
{
case 1:
case 2:printf("%d",*p++);
case 3:printf("%d",*(--p));
}
}
}
执行后的输出结果是( )。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6860-c089-2897e0346522.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
点击查看题目
C语言中,形参缺省的存储类别是()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4d08-c089-2897e0346509.html
点击查看题目
有以下程序
#include
main()
{int a=2,b;
b=a<<2; printf(“%d\n”,b);
}
程序运行后的输出结果是()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6478-c089-2897e0346516.html
点击查看题目
设有语句int a=3,则执行语句a+=a-=a*a以后变量a的值是()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4920-c089-2897e0346501.html
点击查看题目
以下程序运行后的输出结果是( ) 。
#include
main()
{int i,j;
for(i=6;i>3;i--) j=i;
printf(“%d%d\n”,i,j);
}
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6478-c089-2897e0346518.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
点击查看题目
有以下程序
#include "stdio.h"
int abc(int u,intv);
main ()
{ int a=24,b=16,c;
c=abc(a,b);
printf('%d\n",c);
}
int abc(int u,int v)
{ int w;
while(v)
{ w=u%v; u=v; v=w }
return u;
}
输出结果是()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-5ca8-c089-2897e0346516.html
点击查看题目
首页
>
IT互联网
>
信息技术知识竞赛c语言
题目内容
(
单选题
)
手机预览
试题通
信息技术知识竞赛c语言

设ch是char型变量,其值为A,且有下面的表达式:
ch=(ch>='A'&&ch<='Z')?(ch+32):ch 的值是()。

A、A

B、a

C、Z

D、z

答案:B

试题通
试题通
信息技术知识竞赛c语言
相关题目
若有定义语句: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
点击查看答案
如果程序中用到标准库函数log(),那么该程序应含下面哪条语句( )。

A. #include ”stdio.h”

B. #include ”math.h “

C. #include ”string.h”

D. #include ”stdlib.h”

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-54d8-c089-2897e034650e.html
点击查看答案
有以下程序
#include
void main()
{
int j,a[]={1,3,5,7,9,11,13,15},*p=a+5;
for(j=3;j;j--)
{
switch(j)
{
case 1:
case 2:printf("%d",*p++);
case 3:printf("%d",*(--p));
}
}
}
执行后的输出结果是( )。

A. 9911

B. 79911

C. 99999

D. 991113

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6860-c089-2897e0346522.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
点击查看答案
C语言中,形参缺省的存储类别是()。

A. auto(自动)

B. static(静态)

C. register(寄存器)

D. extern(外部)

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4d08-c089-2897e0346509.html
点击查看答案
有以下程序
#include
main()
{int a=2,b;
b=a<<2; printf(“%d\n”,b);
}
程序运行后的输出结果是()。

A. 2

B. 4

C. 6

D. 8

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6478-c089-2897e0346516.html
点击查看答案
设有语句int a=3,则执行语句a+=a-=a*a以后变量a的值是()。

A. 3

B. 0

C. 9

D. -12

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4920-c089-2897e0346501.html
点击查看答案
以下程序运行后的输出结果是( ) 。
#include
main()
{int i,j;
for(i=6;i>3;i--) j=i;
printf(“%d%d\n”,i,j);
}

A. 2,3

B. 3,3

C. 3,4

D. 4,5

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6478-c089-2897e0346518.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
点击查看答案
有以下程序
#include "stdio.h"
int abc(int u,intv);
main ()
{ int a=24,b=16,c;
c=abc(a,b);
printf('%d\n",c);
}
int abc(int u,int v)
{ int w;
while(v)
{ w=u%v; u=v; v=w }
return u;
}
输出结果是()。

A. 6

B. 7

C. 8

D. 9

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