试题通
试题通
APP下载
首页
>
IT互联网
>
信息技术知识竞赛c语言
试题通
搜索
信息技术知识竞赛c语言
题目内容
(
单选题
)
若有定义语句:int year=2009,*p=&year;,以下不能使变量year中的值增至2010的语句是()。

A、*p+=1;

B、(*p)++;

C、 ++(*p);

D、 *p++;

答案:D

试题通
信息技术知识竞赛c语言
试题通
下列程序段的执行结果是输出( )。
x=3;
do

printf("%2d",x--);
} while(!x);
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-54d8-c089-2897e0346520.html
点击查看题目
有以下程序
#include
main()
{ char p[]={′a′, ′b′, ′c′},q[10]={ ′a′, ′b′, ′c′};
printf("%d%d\n",strlen(p),strlen(q));}
以下叙述中正确的是 ( )。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6478-c089-2897e0346523.html
点击查看题目
表达式“0?(0?3:2):(10?1:0)”的值为()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4920-c089-2897e034650a.html
点击查看题目
若有以下程序片段:
char str[ ]="ab\n\012\\\"";
printf("%d",strlen(str));
上面程序片段的输出结果是 ( )。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-50f0-c089-2897e0346520.html
点击查看题目
设x、y、t均为int型变量,则执行语句:x=y=3;t=++x||++y;后,y的值为()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6090-c089-2897e0346514.html
点击查看题目
有以下程序
#include
void ive(x,n)
int x[],n;
{ int t,*p;
p=x+n-1;
while(x{ t=*x;
*x++=*p;
*p--=t;
}
return;
}
void main()
{ int i,a[]={1,2,3,4,5,6,7,8,9,0};
ive(a,10);
for(i=0;i<10;i++)
printf("%d ",a[i]);
printf("\n");
}

执行后的输出结果是( )。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6860-c089-2897e034651e.html
点击查看题目
有以下程序
#include
void main()
{
int a[][2]={10,20,30,40,50,60},(*p)[2];
p=a;
printf("%d\n",*(*(p+2)+1));
}
程序运行后的输出结果是 ( )。  
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6860-c089-2897e034650e.html
点击查看题目
设实型变量为f1、f2、f3、f4的值分别为4,3,2,1整型变量m1、m2
的值为1。表达式“(m1=f1>f2)&&(m2=f3
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4920-c089-2897e034650c.html
点击查看题目
以下数组定义中不正确的是()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-50f0-c089-2897e034650c.html
点击查看题目
下述对C语言字符数组的描述中错误的是( )。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-50f0-c089-2897e0346517.html
点击查看题目
首页
>
IT互联网
>
信息技术知识竞赛c语言
题目内容
(
单选题
)
手机预览
试题通
信息技术知识竞赛c语言

若有定义语句:int year=2009,*p=&year;,以下不能使变量year中的值增至2010的语句是()。

A、*p+=1;

B、(*p)++;

C、 ++(*p);

D、 *p++;

答案:D

试题通
试题通
信息技术知识竞赛c语言
相关题目
下列程序段的执行结果是输出( )。
x=3;
do

printf("%2d",x--);
} while(!x);

A. 3 2 1

B. 3

C. 2 1

D. 2 1 0

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-54d8-c089-2897e0346520.html
点击查看答案
有以下程序
#include
main()
{ char p[]={′a′, ′b′, ′c′},q[10]={ ′a′, ′b′, ′c′};
printf("%d%d\n",strlen(p),strlen(q));}
以下叙述中正确的是 ( )。

A. 在给p和q数组置初值时,系统会自动添加字符串结束符,故输出的长度都为3

B. 由于p数组中没有字符串结束符,长度不能确定,但q数组中字符串长度为3

C. 由于q数组中没有字符串结束符,长度不能确定,但p数组中字符串长度为3

D. 由于p和q数组中都没有字符串结束符,故长度都不能确定

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6478-c089-2897e0346523.html
点击查看答案
表达式“0?(0?3:2):(10?1:0)”的值为()。

A. 3

B. 2

C. 1

D. 0

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4920-c089-2897e034650a.html
点击查看答案
若有以下程序片段:
char str[ ]="ab\n\012\\\"";
printf("%d",strlen(str));
上面程序片段的输出结果是 ( )。

A. 3

B. 4

C. 6

D. 12

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-50f0-c089-2897e0346520.html
点击查看答案
设x、y、t均为int型变量,则执行语句:x=y=3;t=++x||++y;后,y的值为()。

A. 不定值

B. 4

C. 3

D. 1

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6090-c089-2897e0346514.html
点击查看答案
有以下程序
#include
void ive(x,n)
int x[],n;
{ int t,*p;
p=x+n-1;
while(x{ t=*x;
*x++=*p;
*p--=t;
}
return;
}
void main()
{ int i,a[]={1,2,3,4,5,6,7,8,9,0};
ive(a,10);
for(i=0;i<10;i++)
printf("%d ",a[i]);
printf("\n");
}

执行后的输出结果是( )。

A. 1 2 3 4 5 6 7 8 9 0

B. 0 9 8 7 6 5 4 3 2 1

C. 1 3 5 7 9 2 4 6 8 0

D. 0 8 6 4 2 9 7 5 3 1

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6860-c089-2897e034651e.html
点击查看答案
有以下程序
#include
void main()
{
int a[][2]={10,20,30,40,50,60},(*p)[2];
p=a;
printf("%d\n",*(*(p+2)+1));
}
程序运行后的输出结果是 ( )。  

A. 10

B. 20

C. 40

D. 60

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6860-c089-2897e034650e.html
点击查看答案
设实型变量为f1、f2、f3、f4的值分别为4,3,2,1整型变量m1、m2
的值为1。表达式“(m1=f1>f2)&&(m2=f3

A. 0

B. 1

C. 2

D. 出错

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4920-c089-2897e034650c.html
点击查看答案
以下数组定义中不正确的是()。

A. int a[2][3];

B. int b[][3]={0,1,2,3};

C. int c[100][100]={0};

D. int d[3][]={{1,2},{1,2,3},{1,2,3,4}};

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-50f0-c089-2897e034650c.html
点击查看答案
下述对C语言字符数组的描述中错误的是( )。

A. 字符数组可以存放字符串

B. 字符数组中的字符串可以整体输入、输出

C. 可以在赋值语句中通过赋值运算符"="对字符数组整体赋值

D. 不可以用关系运算符对字符数组中的字符串进行比较

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