APP下载
首页
>
IT互联网
>
信息技术知识竞赛c语言
搜索
信息技术知识竞赛c语言
题目内容
(
单选题
)
在以下定义中,标识符p( )。
int (*p)[3];

A、定义不合法

B、是一个指针数组名,每个元素是一个指向整数变量的指针

C、是一个指针,它指向一个具有三个元素的一维数组

D、是一个指向整型变量的指针

答案:C

信息技术知识竞赛c语言
以下叙述中不正确的是()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-50f0-c089-2897e034650d.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
点击查看题目
以下叙述正确的是()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4d08-c089-2897e0346511.html
点击查看题目
有以下程序
fun(int x,int y)
{static int m=0,i=2; i+=m+1;m=i+x+y; return m; }
main()
{int j=1,m=1,k;
k=fun(j,m); printf("%d,",k);
k=fun(j,m);
printf("%d\n",k);
}
执行后的输出结果
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-58c0-c089-2897e034651d.html
点击查看题目
8、 有以下程序
struct STU{
char name[10];
int num;
};
void f1(struct STU c)
{ struct STU b={"LiSiGuo",2042};
c=b;}
void f2(struct STU *c)
{ struct STU b={"SunDan",2044};
*c=b;
}
main( )
{ struct STU a={"YangSan",2041},b={"WangYin",2043};
f1(a);f2(&b);
printf("%d %d\n",a.num,b.num);}
执行后的输出结果是 ()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-58c0-c089-2897e0346503.html
点击查看题目
以下程序的输出结果是()。
long fun( int n)
{ long s;
if(n==1||n==2)s=2;
else s=n-fun(n-1);
return s;}
main()
{ printf("%ld\n", fun(3)); }
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-58c0-c089-2897e034650b.html
点击查看题目
下列程序的运行结果是()。
void fun(int *a, int *b)
{ int *k;
k=a; a=b; b=k;
}
main()
{ int a=3, b=6, *x=&a, *y=&b;
fun(x,y);
printf("%d %d", a, b);
}
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6090-c089-2897e034650a.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
点击查看题目
要求通过while循环不断读入字符,当读入字母N时结束循环。若变量已正确定义,以下正确的程序段是()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4d08-c089-2897e0346526.html
点击查看题目
以下程序的输出结果是()。
func(int a,int b)
{ int c;
c=a+b;
return c;}
main( )
{ int x=6,y=7,z=8,r=0;
r=func((x--,y++,x+y),z--);
printf(“%d\n”,r);}
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-58c0-c089-2897e0346500.html
点击查看题目
首页
>
IT互联网
>
信息技术知识竞赛c语言
题目内容
(
单选题
)
手机预览
信息技术知识竞赛c语言

在以下定义中,标识符p( )。
int (*p)[3];

A、定义不合法

B、是一个指针数组名,每个元素是一个指向整数变量的指针

C、是一个指针,它指向一个具有三个元素的一维数组

D、是一个指向整型变量的指针

答案:C

信息技术知识竞赛c语言
相关题目
以下叙述中不正确的是()。

A. 在C中,函数中的自动变量可以赋初值,每调用一次,赋一次初值。

B. 在C中,在调用函数时,实在参数和对应形参在类型上只需赋值兼容。

C. 在C中,外部变量的隐含类别是自动存储类别。

D. 在C中,函数形参可以说明为register变量。

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-50f0-c089-2897e034650d.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
点击查看答案
以下叙述正确的是()。

A. C程序中各函数之间既允许直接递归调用,也允许间接递归调用

B. C程序中各函数之间不允许直接递归调用,也不允许间接递归调用

C. C程序中各函数允许直接递归调用,不允许间接递归调用

D. C程序中各函数之间不允许直接递归调用,允许间接递归调用

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4d08-c089-2897e0346511.html
点击查看答案
有以下程序
fun(int x,int y)
{static int m=0,i=2; i+=m+1;m=i+x+y; return m; }
main()
{int j=1,m=1,k;
k=fun(j,m); printf("%d,",k);
k=fun(j,m);
printf("%d\n",k);
}
执行后的输出结果

A. 5,5

B. 5,11

C. 11,11

D. 11,5

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-58c0-c089-2897e034651d.html
点击查看答案
8、 有以下程序
struct STU{
char name[10];
int num;
};
void f1(struct STU c)
{ struct STU b={"LiSiGuo",2042};
c=b;}
void f2(struct STU *c)
{ struct STU b={"SunDan",2044};
*c=b;
}
main( )
{ struct STU a={"YangSan",2041},b={"WangYin",2043};
f1(a);f2(&b);
printf("%d %d\n",a.num,b.num);}
执行后的输出结果是 ()。

A. 2041 2044

B. 2041 2043

C. 2042 2044

D. 2042 2043

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-58c0-c089-2897e0346503.html
点击查看答案
以下程序的输出结果是()。
long fun( int n)
{ long s;
if(n==1||n==2)s=2;
else s=n-fun(n-1);
return s;}
main()
{ printf("%ld\n", fun(3)); }

A. 1

B. 2

C. 3

D. 4

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-58c0-c089-2897e034650b.html
点击查看答案
下列程序的运行结果是()。
void fun(int *a, int *b)
{ int *k;
k=a; a=b; b=k;
}
main()
{ int a=3, b=6, *x=&a, *y=&b;
fun(x,y);
printf("%d %d", a, b);
}

A. 6 3

B. 3 6

C. 编译出错

D. 0 0

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6090-c089-2897e034650a.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
点击查看答案
要求通过while循环不断读入字符,当读入字母N时结束循环。若变量已正确定义,以下正确的程序段是()。

A. while((ch=getchar())!="N")printf("%c",ch);

B. while(ch=getchar()!="N")printf("%c",ch);

C. while(ch=getchar()=="N")printf("%c",ch);

D. while((ch=getchar())=="N")printf("%c",ch);

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4d08-c089-2897e0346526.html
点击查看答案
以下程序的输出结果是()。
func(int a,int b)
{ int c;
c=a+b;
return c;}
main( )
{ int x=6,y=7,z=8,r=0;
r=func((x--,y++,x+y),z--);
printf(“%d\n”,r);}

A. 11

B. 20

C. 21

D. 31

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