05有以下程序程序运行后的输出结果是_#include stdioh main int a=1b=2c=3d=0;if a==1 ifb!=2 if c==3d=1;else d=2; else ifc!=3d=3; else d=4; else d=5; printfdnd ;结果是多少为什么
程序运行后的输出结果是1。因为a的值为1,第一个if语句成立,进入第二个if语句,因为b的值为2,所以第二个if语句不成立,进入else if语句,因为c的值为3,所以第一个条件不成立,进入else语句,将d的值赋为5,最后输出d的值为1。
原文地址: https://www.cveoy.top/t/topic/gfIu 著作权归作者所有。请勿转载和采集!