以下代码的输出是什么:
#include
using namespace std;
int main()
{
try {
throw 10;
}
catch (char *excp) {
cout << "Caught " << excp;
}
catch (...) {
cout << "Default Exception\n";
}
return 0;
}
(A)编译器错误
(B)捕获的默认异常
(C)捕获的整数异常
(D)默认例外答案: (D)
说明:请参阅:https://www.geeksforgeeks.org/exception-handling-c/
这个问题的测验
如果您在以上帖子中发现任何错误,请在下面发表评论