Computer Science, asked by pk732372, 1 month ago

Which of the following is not a standard exception built in C++.
(A) std::bad_creat
(B) std::bad alloc
(C) std::bad_cast
(D) std::bad typeid​

Answers

Answered by TERNIONxShivy
1

Answer: std::bad_creat is not a standard exception built in C++.

Explanation:

Answered by Tulsi4890
0

The correct answer is (A) std::bad_creat.

  • std::bad_alloc: This is a standard C++ exception that is thrown when an allocation request for memory fails.

  • std::bad_cast: This exception is thrown when a type conversion using dynamic_cast fails.

  • std::bad_typeid: This exception is thrown when typeid is applied to a dereferenced null pointer or a reference to a null pointer.

  • std::bad_creat: This is not a standard C++ exception. There is no such exception in the C++ standard library.

In summary, std::bad_creat is not a standard exception in C++. The other options, std::bad_alloc, std::bad_cast, and std::bad_typeid are all standard C++ exceptions. It's important to note that C++ allows users to define their own exception classes as well.

In C++, exceptions are a way to handle errors and unexpected situations that occur during program execution. When an exception is thrown, the normal flow of execution is interrupted, and the program looks for an exception handler that can handle the exception.

Therefore, the correct answer is (A) std::bad_creat.

To learn more about C++ from the given link.

https://brainly.in/question/1018225

#SPJ3

Similar questions