试题通
试题通
APP下载
首页
>
IT互联网
>
信息技术知识竞赛c语言
试题通
搜索
信息技术知识竞赛c语言
题目内容
(
单选题
)
x,y,z被定义为int型变量,若从键盘给x,y,z输入数据,正确的输入语句是 ()。

A、INPUT x,y,z;

B、scanf("%d%d%d",&x,&y,&z);

C、scanf("%d%d%d",x,y,z);

D、read("%d%d%d",&x,&y,&z);

答案:B

试题通
信息技术知识竞赛c语言
试题通
有以下程序
main()
{char s[ ]={ "aeiou"},*ps;
ps=s; printf("%c\n",*ps+4);}程序运行后的输出结果是()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-5ca8-c089-2897e0346503.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
点击查看题目
设X,Y,Z和K是int型变量,则执行表达式:X=(Y=4,Z=16,K=32)
后,X的值为()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4920-c089-2897e0346509.html
点击查看题目
下列if语句中,不正确的是()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4920-c089-2897e0346510.html
点击查看题目
以下程序的输出结果是()。
main()
{ int a=4,b=5,c=0,d;
d=!a&&!b||!c;
printf("%d\n",d);}
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4920-c089-2897e034650b.html
点击查看题目
设有以下定义和语句
char str[20]="Program",*p;
p=str;
则以下叙述中正确的是()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-50f0-c089-2897e0346503.html
点击查看题目
下面程序的输出结果为()。
struct st
{ int x;
int *y;
} *p;
int dt[4]={10,20,30,40};
struct st aa[4]={ 50,&dt[0],60,&dt[1],70,&dt[2],80,&dt[3] };
main()
{ p=aa;
printf("%d\n", ++p->x );
printf("%d\n", (++p)->x);
printf("%d\n", ++( *p->y));
}
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6090-c089-2897e034650c.html
点击查看题目
在宏定义#define PI 3.14159中,用宏名PI代替一个()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4d08-c089-2897e034650e.html
点击查看题目
在嵌套使用if语句时,C语言规定else总是()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-50f0-c089-2897e0346508.html
点击查看题目
以下程序运行后的输出结果是( ) 。
#include
void fun(int x)
{if(x/5>0) fun(x/5);
printf(“%d”,x);
}
main()
{fun(11); printf(“\n”);}
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6478-c089-2897e034651a.html
点击查看题目
首页
>
IT互联网
>
信息技术知识竞赛c语言
题目内容
(
单选题
)
手机预览
试题通
信息技术知识竞赛c语言

x,y,z被定义为int型变量,若从键盘给x,y,z输入数据,正确的输入语句是 ()。

A、INPUT x,y,z;

B、scanf("%d%d%d",&x,&y,&z);

C、scanf("%d%d%d",x,y,z);

D、read("%d%d%d",&x,&y,&z);

答案:B

试题通
试题通
信息技术知识竞赛c语言
相关题目
有以下程序
main()
{char s[ ]={ "aeiou"},*ps;
ps=s; printf("%c\n",*ps+4);}程序运行后的输出结果是()。

A. a

B. e

C. u

D. 元素s[4]的地址

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-5ca8-c089-2897e0346503.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
点击查看答案
设X,Y,Z和K是int型变量,则执行表达式:X=(Y=4,Z=16,K=32)
后,X的值为()。

A. 4

B. 16

C. 32

D. 52

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4920-c089-2897e0346509.html
点击查看答案
下列if语句中,不正确的是()。

A. if(x>y);

B. if(x==y) x+=y;

C. if(x!=y) scanf("%d",&x) else x=1;

D. if(x<y) {x++;y++;}

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4920-c089-2897e0346510.html
点击查看答案
以下程序的输出结果是()。
main()
{ int a=4,b=5,c=0,d;
d=!a&&!b||!c;
printf("%d\n",d);}

A. 1

B. 0

C. 非0数

D. -1

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4920-c089-2897e034650b.html
点击查看答案
设有以下定义和语句
char str[20]="Program",*p;
p=str;
则以下叙述中正确的是()。

A. *p与str[0]的值相等

B. str与p的类型完全相同

C. str数组长度和p所指向的字符串长度相等

D. 数组str中存放的内容和指针变量p中存放的内容相同

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-50f0-c089-2897e0346503.html
点击查看答案
下面程序的输出结果为()。
struct st
{ int x;
int *y;
} *p;
int dt[4]={10,20,30,40};
struct st aa[4]={ 50,&dt[0],60,&dt[1],70,&dt[2],80,&dt[3] };
main()
{ p=aa;
printf("%d\n", ++p->x );
printf("%d\n", (++p)->x);
printf("%d\n", ++( *p->y));
}

A. 10

20

20

B. 50

20

20

C. 51

60

21

D. 60

70

31

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6090-c089-2897e034650c.html
点击查看答案
在宏定义#define PI 3.14159中,用宏名PI代替一个()。

A. 常量

B. 单精度数

C. 双精度数

D. 字符串

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4d08-c089-2897e034650e.html
点击查看答案
在嵌套使用if语句时,C语言规定else总是()。

A. 和之前与其具有相同缩进位置的if配对

B. 和之前与其最近的if配对

C. 和之前与其最近的且不带else的if配对

D. 和之前的第一个if配对

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-50f0-c089-2897e0346508.html
点击查看答案
以下程序运行后的输出结果是( ) 。
#include
void fun(int x)
{if(x/5>0) fun(x/5);
printf(“%d”,x);
}
main()
{fun(11); printf(“\n”);}

A. 211

B. 212

C. 213

D. 214

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