APP下载
首页
>
IT互联网
>
信息技术知识竞赛c语言
搜索
信息技术知识竞赛c语言
题目内容
(
单选题
)
若有数组定义: char array [ ]="China"; 则数组 array所占的空间为( )。

A、4个字节

B、5个字节

C、6个字节

D、7个字节

答案:C

信息技术知识竞赛c语言
C语言中规定函数的返回值的类型是由( )。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-50f0-c089-2897e0346512.html
点击查看题目
在C语言中,以下正确的说法是( ) 。

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-54d8-c089-2897e0346519.html
点击查看题目
以下程序
main() {int x[3][2]={0},I;
for(I=0;I<3;I++) scanf("%d",x[i]);
printf("%3d%3d%3d\n",x[0][0],x[0][1],x[1][0]);}
若运行时输入:246<回车>,则输出结果为()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-5ca8-c089-2897e0346502.html
点击查看题目
有以下程序
#include
void main()
{
int s,i,sum();
for (i=1;i<=10;i++)
s=sum(i);
printf("s=%d\n",s);
}
sum(int k)
{
int x=0;
return (x+=k);
}  
程序运行后的输出结果是 ( )。  
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6860-c089-2897e034650f.html
点击查看题目
下面程序的输出结果是 ( )。
main()
{ int a[10]={1,2,3,4,5,6,7,8,9,10},*p=a;
printf("%d\n",*(p+2));}
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6478-c089-2897e0346521.html
点击查看题目
有以下程序
#include "stdio.h"
#include "string.h"
void main( )
{ char str[100] ="How do you do";
strcpy( str + strlen(str)/2, "es she");
printf("%s\n", str);
}
执行后的输出结果是( )。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6860-c089-2897e0346513.html
点击查看题目
有以下程序
#include “stdio.h”
fun(int x, int y){ return (x+y); }
void main()
{ int a=1, b=2, c=3, sum;
sum=fun((a++,b++,a+b),c++);
printf("%d\n",sum);
}
执行后的输出结果是( )。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6c48-c089-2897e0346511.html
点击查看题目
以下所列的各函数首部中,正确的是()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-50f0-c089-2897e0346522.html
点击查看题目
#include
void disp(char *string)
{
if(*string)
{
disp( string+1);
putchar (*string);
}
}
void main()
{
disp("abcdefg");
}
程序的运行结果是( )。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6860-c089-2897e0346506.html
点击查看题目
有以下程序
#include
#define M 5
#define N M+M
void main()
{ int k;
k=N*N*5; printf("%d\n",k);
}
执行后的输出结果是( )。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6c48-c089-2897e0346501.html
点击查看题目
首页
>
IT互联网
>
信息技术知识竞赛c语言
题目内容
(
单选题
)
手机预览
信息技术知识竞赛c语言

若有数组定义: char array [ ]="China"; 则数组 array所占的空间为( )。

A、4个字节

B、5个字节

C、6个字节

D、7个字节

答案:C

信息技术知识竞赛c语言
相关题目
C语言中规定函数的返回值的类型是由( )。

A. return语句中的表达式类型所决定

B. 调用该函数时的主调用函数类型所决定

C. 调用该函数时系统临时决定

D. 在定义该函数时所指定的函数类型所决定

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-50f0-c089-2897e0346512.html
点击查看答案
在C语言中,以下正确的说法是( ) 。

A. 实参和与其对应的形参各占用独立的存储单元

B. 实参和与其对应的形参共占用一个存储单元

C. 只有当实参和与其对应的形参同名时才共占用存储单元

D. 形参是虚拟的,不占用存储单元

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-54d8-c089-2897e0346519.html
点击查看答案
以下程序
main() {int x[3][2]={0},I;
for(I=0;I<3;I++) scanf("%d",x[i]);
printf("%3d%3d%3d\n",x[0][0],x[0][1],x[1][0]);}
若运行时输入:246<回车>,则输出结果为()。

A. 2 0 0

B. 2 0 4

C. 2 4 0

D. 2 4 6

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-5ca8-c089-2897e0346502.html
点击查看答案
有以下程序
#include
void main()
{
int s,i,sum();
for (i=1;i<=10;i++)
s=sum(i);
printf("s=%d\n",s);
}
sum(int k)
{
int x=0;
return (x+=k);
}  
程序运行后的输出结果是 ( )。  

A. 55

B. 45

C. 15

D. 10

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6860-c089-2897e034650f.html
点击查看答案
下面程序的输出结果是 ( )。
main()
{ int a[10]={1,2,3,4,5,6,7,8,9,10},*p=a;
printf("%d\n",*(p+2));}

A. 3

B. 4

C. 1

D. 2

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6478-c089-2897e0346521.html
点击查看答案
有以下程序
#include "stdio.h"
#include "string.h"
void main( )
{ char str[100] ="How do you do";
strcpy( str + strlen(str)/2, "es she");
printf("%s\n", str);
}
执行后的输出结果是( )。

A. How do you do

B. es she

C. How are you

D. How does she

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6860-c089-2897e0346513.html
点击查看答案
有以下程序
#include “stdio.h”
fun(int x, int y){ return (x+y); }
void main()
{ int a=1, b=2, c=3, sum;
sum=fun((a++,b++,a+b),c++);
printf("%d\n",sum);
}
执行后的输出结果是( )。

A. 6

B. 7

C. 8

D. 9

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6c48-c089-2897e0346511.html
点击查看答案
以下所列的各函数首部中,正确的是()。

A. void play(var a:integer,var b:integer)

B. void play(int a,b)

C. void play(int a,int b)

D. sub play(a as integer,b as integer)

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-50f0-c089-2897e0346522.html
点击查看答案
#include
void disp(char *string)
{
if(*string)
{
disp( string+1);
putchar (*string);
}
}
void main()
{
disp("abcdefg");
}
程序的运行结果是( )。

A. abcdefg

B. gfedcba

C. abcd

D. dcba

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6860-c089-2897e0346506.html
点击查看答案
有以下程序
#include
#define M 5
#define N M+M
void main()
{ int k;
k=N*N*5; printf("%d\n",k);
}
执行后的输出结果是( )。

A. 50

B. 55

C. 500

D. 550

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