试题通
试题通
APP下载
首页
>
IT互联网
>
信息技术知识竞赛c语言
试题通
搜索
信息技术知识竞赛c语言
题目内容
(
单选题
)
已知 int i,a; 执行语句“i=(a=2*3,a*5),a+6;”后,变量a的值是( )。

A、6

B、12

C、30

D、36

答案:A

试题通
信息技术知识竞赛c语言
试题通
以下程序段输出结果是()。
main()
{ int k,j,s;
for(k=2;k<6;k++,k++)
{ s=1;for(j=k;j<6;j++) s+=j;}
printf(“%d\n”,s);}
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-54d8-c089-2897e0346522.html
点击查看题目
有以下程序
#include
fun(int n, int *s)
{ int f1, f2;
if(n==1||n==2)
*s=1;
else
{ fun(n-1, &f1);
fun(n-2, &f2);
*s=f1+f2;
}
}
void main()
{ int x;
fun(6, &x);
printf("%d\n", x);
}
执行后的输出结果是( )。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6860-c089-2897e0346519.html
点击查看题目
下列变量定义中合法的是()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4920-c089-2897e0346511.html
点击查看题目
若二维数组a有m行n列,则下面能够正确引用元素a[i][j]的为() 。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-50f0-c089-2897e0346518.html
点击查看题目
表达式“0?(0?3:2):(10?1:0)”的值为()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4920-c089-2897e034650a.html
点击查看题目
有以下程序
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
#include
void fun(char *w,int m)
{char s,*p1,*p2;
p1=w;p2=w+m-1;
while(p1}
main()
{char a[]=”123456”;
fun(a,strlen(a)); puts(a);
}
程序运行后的输出结果是( )。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6478-c089-2897e0346514.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
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
点击查看题目
有以下程序
#include
main()
{char ch[3][5]={“AAAA”,”BBB”,”CC”};
printf(“%s\n”,ch[1]);
}
程序运行后的输出结果是()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6478-c089-2897e0346513.html
点击查看题目
首页
>
IT互联网
>
信息技术知识竞赛c语言
题目内容
(
单选题
)
手机预览
试题通
信息技术知识竞赛c语言

已知 int i,a; 执行语句“i=(a=2*3,a*5),a+6;”后,变量a的值是( )。

A、6

B、12

C、30

D、36

答案:A

试题通
试题通
信息技术知识竞赛c语言
相关题目
以下程序段输出结果是()。
main()
{ int k,j,s;
for(k=2;k<6;k++,k++)
{ s=1;for(j=k;j<6;j++) s+=j;}
printf(“%d\n”,s);}

A. 9

B. 1

C. 11

D. 10

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-54d8-c089-2897e0346522.html
点击查看答案
有以下程序
#include
fun(int n, int *s)
{ int f1, f2;
if(n==1||n==2)
*s=1;
else
{ fun(n-1, &f1);
fun(n-2, &f2);
*s=f1+f2;
}
}
void main()
{ int x;
fun(6, &x);
printf("%d\n", x);
}
执行后的输出结果是( )。

A. 9

B. 8

C. 7

D. 6

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6860-c089-2897e0346519.html
点击查看答案
下列变量定义中合法的是()。

A. short _a=1-.le-1;

B. double b=1+5e2.5;

C. long do=0xfdaL;

D. float 2_and=1-e-3;

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4920-c089-2897e0346511.html
点击查看答案
若二维数组a有m行n列,则下面能够正确引用元素a[i][j]的为() 。

A. *(a+j*n+i)

B. *(a+i*n+j)

C. *(*(a+i)+j)

D. *(*a+i)+j

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-50f0-c089-2897e0346518.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
点击查看答案
有以下程序
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
#include
void fun(char *w,int m)
{char s,*p1,*p2;
p1=w;p2=w+m-1;
while(p1}
main()
{char a[]=”123456”;
fun(a,strlen(a)); puts(a);
}
程序运行后的输出结果是( )。

A. 654321

B. 116611

C. 161616

D. 123456

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6478-c089-2897e0346514.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
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
点击查看答案
有以下程序
#include
main()
{char ch[3][5]={“AAAA”,”BBB”,”CC”};
printf(“%s\n”,ch[1]);
}
程序运行后的输出结果是()。

A. AAAA

B. CC

C. BBBCC

D. BBB

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