APP下载
首页
>
财会金融
>
C语言复习题2464343都觉得手机壳
搜索
C语言复习题2464343都觉得手机壳
题目内容
(
单选题
)
3.下面叙述错误的是( )。(选一项)

A、 C程序中,各种括号应成对出现

B、 C程序中,赋值号的左边不可以是表达式

C、 C程序中,变量名的大小写是有区别的

D、 C程序中,若未给变量赋初值,则变量的初值自动为0

答案:D

C语言复习题2464343都觉得手机壳
12.在 C语言中,下列代码片段的输出结果是( )。(选一项)float a = 50;int b = 4;float c = a/b;printf(“%0.1lf”,c);
https://www.shititong.cn/cha-kan/shiti/0003cc23-47c7-5185-c025-5c3e10a5bb00.html
点击查看题目
5.在 C程序中,合法的关键字是( )。(选一项)
https://www.shititong.cn/cha-kan/shiti/0003cc23-47c7-43f2-c025-5c3e10a5bb00.html
点击查看题目
7.在C语言中,printf("%0.1f",3/5)的值是( )。(选一项)
https://www.shititong.cn/cha-kan/shiti/0003cc23-47c7-47d2-c025-5c3e10a5bb00.html
点击查看题目
8.在C语言中,printf("%0.1f",5/3)的值是( )。(选一项)
https://www.shititong.cn/cha-kan/shiti/0003cc23-47c7-49c0-c025-5c3e10a5bb00.html
点击查看题目
9.在C语言中,假设以下所有变量均为整型,则下列代码执行后c的值是( )。(选一项)a=2;b=5;b++;c=a+b;printf( );
https://www.shititong.cn/cha-kan/shiti/0003cc23-47c7-4b6a-c025-5c3e10a5bb00.html
点击查看题目
1、从键盘输入一个正方形的边长,计算并输出该正方形的内切圆的面积对正方形的覆盖率。//友情提示printf( );//定义正方形边长double a;//从窗口输入数据scanf( );//计算圆的面积double s1=3.14*( )*( );//计算正方形面积double s2=a*a;//计算覆盖率double p=s1/s2;//输出结果printf( );
https://www.shititong.cn/cha-kan/shiti/0003cc23-47c7-5b8c-c025-5c3e10a5bb00.html
点击查看题目
1.在表达式(6!=8)&&(3==3)的值是( )。(选一项)
https://www.shititong.cn/cha-kan/shiti/0003cc23-47c7-2af1-c025-5c3e10a5bb00.html
点击查看题目
4.以下合法的用户标识符是( )。(选一项)
https://www.shititong.cn/cha-kan/shiti/0003cc23-47c7-41c0-c025-5c3e10a5bb00.html
点击查看题目
2.有如下程序段int a=14,b=15,x;char c=’A’;x=(a<b)&&(c<’B’);printf("%d",x);执行该程序段后,x的值为( )。(选一项)
https://www.shititong.cn/cha-kan/shiti/0003cc23-47c7-3b98-c025-5c3e10a5bb00.html
点击查看题目
1、写出下面选择结构的判定条件的 C语句表达式:( ).对于整数x,判断x是否在区间[0,100]内;x>=0&&x(2).对于整数y,判断y是否是3和5的倍数;y%3==0&&y%5==0(3).给出一个年份值year,判断year是否为闰年。year是闰年的条件是year能被4整除且不能被100整除,或者year可以被400整除。(year%4==0&&year%100!=0) || (year%400==0)
https://www.shititong.cn/cha-kan/shiti/0003cc23-47c7-59ab-c025-5c3e10a5bb00.html
点击查看题目
首页
>
财会金融
>
C语言复习题2464343都觉得手机壳
题目内容
(
单选题
)
手机预览
C语言复习题2464343都觉得手机壳

3.下面叙述错误的是( )。(选一项)

A、 C程序中,各种括号应成对出现

B、 C程序中,赋值号的左边不可以是表达式

C、 C程序中,变量名的大小写是有区别的

D、 C程序中,若未给变量赋初值,则变量的初值自动为0

答案:D

C语言复习题2464343都觉得手机壳
相关题目
12.在 C语言中,下列代码片段的输出结果是( )。(选一项)float a = 50;int b = 4;float c = a/b;printf(“%0.1lf”,c);

A. 0

B. 12

C. 12.0

D. 12.5

https://www.shititong.cn/cha-kan/shiti/0003cc23-47c7-5185-c025-5c3e10a5bb00.html
点击查看答案
5.在 C程序中,合法的关键字是( )。(选一项)

A. int

B. Integer

C. Int

D. Intger

https://www.shititong.cn/cha-kan/shiti/0003cc23-47c7-43f2-c025-5c3e10a5bb00.html
点击查看答案
7.在C语言中,printf("%0.1f",3/5)的值是( )。(选一项)

A. 1

B. 2

C. 0.6

D. 0.0

https://www.shititong.cn/cha-kan/shiti/0003cc23-47c7-47d2-c025-5c3e10a5bb00.html
点击查看答案
8.在C语言中,printf("%0.1f",5/3)的值是( )。(选一项)

A. 1

B. -1

C. 0.0

D. 1.67

https://www.shititong.cn/cha-kan/shiti/0003cc23-47c7-49c0-c025-5c3e10a5bb00.html
点击查看答案
9.在C语言中,假设以下所有变量均为整型,则下列代码执行后c的值是( )。(选一项)a=2;b=5;b++;c=a+b;printf( );

A. 8

B. 6

C. 7

D. 5

https://www.shititong.cn/cha-kan/shiti/0003cc23-47c7-4b6a-c025-5c3e10a5bb00.html
点击查看答案
1、从键盘输入一个正方形的边长,计算并输出该正方形的内切圆的面积对正方形的覆盖率。//友情提示printf( );//定义正方形边长double a;//从窗口输入数据scanf( );//计算圆的面积double s1=3.14*( )*( );//计算正方形面积double s2=a*a;//计算覆盖率double p=s1/s2;//输出结果printf( );
https://www.shititong.cn/cha-kan/shiti/0003cc23-47c7-5b8c-c025-5c3e10a5bb00.html
点击查看答案
1.在表达式(6!=8)&&(3==3)的值是( )。(选一项)

A. true

B. 1

C. 0

D. 非0值

https://www.shititong.cn/cha-kan/shiti/0003cc23-47c7-2af1-c025-5c3e10a5bb00.html
点击查看答案
4.以下合法的用户标识符是( )。(选一项)

A. long

B. \

C. 5a

D. user

https://www.shititong.cn/cha-kan/shiti/0003cc23-47c7-41c0-c025-5c3e10a5bb00.html
点击查看答案
2.有如下程序段int a=14,b=15,x;char c=’A’;x=(a<b)&&(c<’B’);printf("%d",x);执行该程序段后,x的值为( )。(选一项)

A. 1

B. false

C. 0

D. true

https://www.shititong.cn/cha-kan/shiti/0003cc23-47c7-3b98-c025-5c3e10a5bb00.html
点击查看答案
1、写出下面选择结构的判定条件的 C语句表达式:( ).对于整数x,判断x是否在区间[0,100]内;x>=0&&x(2).对于整数y,判断y是否是3和5的倍数;y%3==0&&y%5==0(3).给出一个年份值year,判断year是否为闰年。year是闰年的条件是year能被4整除且不能被100整除,或者year可以被400整除。(year%4==0&&year%100!=0) || (year%400==0)
https://www.shititong.cn/cha-kan/shiti/0003cc23-47c7-59ab-c025-5c3e10a5bb00.html
点击查看答案
试题通小程序
试题通app下载