首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
以下程序运行后的输出结果是【 】。 main() {char c; int n=100; float f=10; double x; x=f*=n/=(c=50); printf("%d %f\n",
以下程序运行后的输出结果是【 】。 main() {char c; int n=100; float f=10; double x; x=f*=n/=(c=50); printf("%d %f\n",
admin
2013-02-23
31
问题
以下程序运行后的输出结果是【 】。
main()
{char c; int n=100;
float f=10; double x;
x=f*=n/=(c=50);
printf("%d %f\n",n,x);
}
选项
答案
2 20.000000
解析
由于赋值运算符按照“自右而左”的结合顺序,题中赋值表达式“x=f*=n/=(c=50)”的求解步骤如下:首先,进行“n/=(c=50)”的运算,相当于n=n/c=100/50=2;其次,进行“f*=n”的运算,相当于“f=f*n”,故f=20.000000;最后,得出x的值为20.000000。
转载请注明原文地址:https://kaotiyun.com/show/lpPp777K
本试题收录于:
二级C语言题库NCRE全国计算机二级分类
0
二级C语言
NCRE全国计算机二级
相关试题推荐
有以下程序: point(char *p){p+=3;} main() {char b[4]={’a’,’b’,’c’,’d’,},*p=b; point(p);printf("%c\n",*p); } 程序运行后
以下不能定义为用户标识符的是 _____。
算法具有五个特性,以下选项中不属于算法特性的是 _____。
下面的说法不正确的是()
按条件f对关系R进行选择,其关系代数表达式是()
以下函数的功能是()intfun(char*A){char*b=a;while(*B)b++;{returnb-a;}}
设有如下枚举类型定义:enumlanguage{Basic=3,Assembly,Ada=100,COBOL,Fortran};枚举类型Fortran的值为()
有下列程序,功能是把输入的+进制长整型数以+六进制的形式输出,完成程序#include"stdio.h"main(){charb[17]={"0123456789ABCDEF"};intc[50],d,i=0,
下列叙述中,不属于测试的特征的是
数据库保护分为:安全性控制、【】、并发性控制和数据的恢复。
随机试题
深静脉血栓形成(下肢的DVT)的患者,约半数以上无自觉症状和明显体征,此时依据双侧下肢周径的测量结果来评价,双侧相差多少即可考虑有临床意义
我国水利面临的新形势是()。
填方土料应符合设计要求,一般不能选用的有()。
出境货物最迟于报关或装运前7天报检。( )
态度的结构包括认知成分、_________和行为成分。
Tom’smothertriedhardtopersuadehimto______fromhisintentiontoinvesthissavingsinstockmarket.
Accordingtotheauthor,the"SpaceRace"was______.Theauthorbringsupthetopicoftheinternationalspacestationinorder
某货车运输公司有一个中央仓库和n个运输目的地,每天要从中央仓库将货物运输到所有运输目的地,到达每个运输目的地一次且仅一次,最后回到中央仓库。在两个地点i和i之间运输货物存在费用Cij,为求解旅行费用总和最小的运输路径,设计如下算法:首先选择离中央仓库最近的
关于QoS协议特点的描述中,错误的是()。
It’sacharacter______inhimthathecan’teveracceptthathe’sinthewrong.
最新回复
(
0
)