第38580题 单选题
在“模拟实验室”程序中,为了防止除以 0 导致崩溃,小杨使用了异常处理机制。执行以下代码将输出( )。
try {
int x = 10, y = 0;
if (y == 0) throw "Zero Error";
cout << x / y;
} catch (int e) {
cout << "Error Code: " << e;
} catch (const char* msg) {
cout << "Caught: " << msg;
}
{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
知识点:
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析