试题通
试题通
APP下载
首页
>
财会金融
>
c语言冲就完事了家人们
试题通
搜索
c语言冲就完事了家人们
题目内容
(
单选题
)
15.下列对数组s的初始化,其中不正确的是______。

A、  char s[5] = {"abc"};

B、  char s[5] = { 'a', 'b', 'c'};

C、  char s[5] = "";

D、  char s[5] = "abcdef";

答案:D

试题通
c语言冲就完事了家人们
试题通
23.执行以下程序后,输出结果是______。
#include "stdio.h"
#define FUN( ) ( )<( )?( ):( )
void main()
{
int i=10,j=15,k;
k=10*FUN( );
printf( );
}
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fa-f1a0-c044-ce3414c8e902.html
点击查看题目
18.已知主调函数中有以下定义及声明:
int a=1,b=2;float fun( );
则在主调函数中可以正确调用此函数的语句是______。
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fa-e9d0-c044-ce3414c8e901.html
点击查看题目
19.下面描述中正确的是______。
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fc-9780-c044-ce3414c8e901.html
点击查看题目
10.以下是if语句的基本形式:
if(表达式) 语句
其中“表达式”______。
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-dfe8-c044-ce3414c8e900.html
点击查看题目
24.设有以下定义:
struct complex
{
int x;
int y;
}num[2]={1,3,2,7};
则表达式num[0].y+num[1].x的结果是______。
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fa-f588-c044-ce3414c8e900.html
点击查看题目
10.下列程序段输出的结果是______。
int x=5;
if(x=4) printf( );
else printf( );
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-89f8-c044-ce3414c8e901.html
点击查看题目
6.已知:int x=1,y=2,t;,则执行语句:t=x,y=x,x=t;后x、y的值分别是______。
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fa-d260-c044-ce3414c8e901.html
点击查看题目
23.执行以下程序后,输出结果是______。
#include
#define MA( ) X*(X+1)
void main( )
{
int a=1,b=2;
printf(
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fc-4d48-c044-ce3414c8e900.html
点击查看题目
6.逗号表达式“(a=3*5,a*4),a+15”的值是______。
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fc-8010-c044-ce3414c8e900.html
点击查看题目
16.设有定义:int a[][3]={1, 2, 3, 4, 5, 6, 7, 8};,则数组a的第1维长度是______。
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fc-9398-c044-ce3414c8e900.html
点击查看题目
首页
>
财会金融
>
c语言冲就完事了家人们
题目内容
(
单选题
)
手机预览
试题通
c语言冲就完事了家人们

15.下列对数组s的初始化,其中不正确的是______。

A、  char s[5] = {"abc"};

B、  char s[5] = { 'a', 'b', 'c'};

C、  char s[5] = "";

D、  char s[5] = "abcdef";

答案:D

试题通
试题通
c语言冲就完事了家人们
相关题目
23.执行以下程序后,输出结果是______。
#include "stdio.h"
#define FUN( ) ( )<( )?( ):( )
void main()
{
int i=10,j=15,k;
k=10*FUN( );
printf( );
}

A.   10

B.   15

C.   100

D.   150

https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fa-f1a0-c044-ce3414c8e902.html
点击查看答案
18.已知主调函数中有以下定义及声明:
int a=1,b=2;float fun( );
则在主调函数中可以正确调用此函数的语句是______。

A.   fun(a);

B.   fun(a,&b);

C.   fun(*a,*b);

D.   fun(&a,a+b);

https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fa-e9d0-c044-ce3414c8e901.html
点击查看答案
19.下面描述中正确的是______。

A.  全局变量定义在函数体之外

B.  函数体内也可以定义全局变量

C.  形参可以是全局变量,也可以是局部变量

D.  局部变量可以被其它函数使用

https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fc-9780-c044-ce3414c8e901.html
点击查看答案
10.以下是if语句的基本形式:
if(表达式) 语句
其中“表达式”______。

A.   必须是逻辑表达式

B.   必须是关系表达式

C.   必须是逻辑表达式或关系表达式

D.   可以是任意合法的表达式

https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-dfe8-c044-ce3414c8e900.html
点击查看答案
24.设有以下定义:
struct complex
{
int x;
int y;
}num[2]={1,3,2,7};
则表达式num[0].y+num[1].x的结果是______。

A.   8

B.   10

C.   3

D.   5

https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fa-f588-c044-ce3414c8e900.html
点击查看答案
10.下列程序段输出的结果是______。
int x=5;
if(x=4) printf( );
else printf( );

A.   TRUEFALSE

B.   FALSETRUE

C.   TRUE

D.   FALSE

https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-89f8-c044-ce3414c8e901.html
点击查看答案
6.已知:int x=1,y=2,t;,则执行语句:t=x,y=x,x=t;后x、y的值分别是______。

A.   1,2

B.   2,1

C.   1,1

D.   2,2

https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fa-d260-c044-ce3414c8e901.html
点击查看答案
23.执行以下程序后,输出结果是______。
#include
#define MA( ) X*(X+1)
void main( )
{
int a=1,b=2;
printf(

A.   7

B.   9

C.   12

D.   18

https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fc-4d48-c044-ce3414c8e900.html
点击查看答案
6.逗号表达式“(a=3*5,a*4),a+15”的值是______。

A.   15

B.   60

C.   30

D.   75

https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fc-8010-c044-ce3414c8e900.html
点击查看答案
16.设有定义:int a[][3]={1, 2, 3, 4, 5, 6, 7, 8};,则数组a的第1维长度是______。

A.  2

B.  3

C.  4

D.  8

https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fc-9398-c044-ce3414c8e900.html
点击查看答案
试题通小程序
试题通app下载