Prepare
Practice
Interview
Aptitude
Reasoning
English
GD
Placement papers
HR
Current affairs
Engineering
MCA
MBA
Online test
Login
Online Practice Test
>
CPP
« Previous
Next »
Which of the following library function below by default aborts the program?
Options
- terminate()
- end()
- abort()
- exit()
CORRECT ANSWER : terminate()
Discussion Board
Right Answer
The right answer is terminate() it aborts the program By default.
same answer in the GIG
Sharique Shaikh 02-16-2021 09:32 AM
Answer to all questions are wrong
Nearly all the question''s answer are wrong on this site.
So avoid this site.
Bhai 03-29-2018 12:22 PM
C++ - std::terminate()
std::terminate is automatically called in a C++ program when there is an unhandled exception. By default, terminate() calls abort(). You can set a custom handle with set_terminate() function. This is essentially the C++ equivalent to abort, assuming that you are reporting all your exceptional errors by means of throwing exceptions. This calls a handler that is set by the std::set_terminate function, which by default simply calls abort.
Prajakta Pandit 01-23-2017 06:57 AM
std::terminate
I agree the answer is incorrect because C++ is case sensitive, so, it whiuld be std::terminate.
Juan 02-27-2015 03:19 PM
Terminate is incorrect
C++ is a case-sensitive language. This means that Terminate() and terminate() are two different functions. So, the answer is incorrect.
kusumo 01-12-2015 01:51 PM
Terminate() is the right answer
exit() can be called to end the program, but std::terminate is used by C++ run-time to abort the program, in case of exception. check this link http://en.cppreference.com/w/cpp/error/terminate
Nancy 09-3-2014 12:43 PM
std::terminate
std::terminate is what is automatically called in a C++ program when there is an unhandled exception. This is essentially the C++ equivalent to abort, assuming that you are reporting all your exceptional errors by means of throwing exceptions. This calls a handler that is set by the std::set_terminate function, which by default simply calls abort.
akash 02-26-2014 12:14 PM
Default terminate the program
Sir, its right answer is exit() function. Because i check in TURBO C compiler library ,in which no any terminate function is present ..... so , check this answer...
pankaj 02-13-2014 01:12 PM
« Previous
Next »
Write your comments
*
*
Email must be in the form someone@domain.com
*
*
Enter the code shown above:
Please enter the code shown above
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)
Related Content
C test (42)
C (12)
C++ for beginners (10)
C++ (20)
C++ (24)
C++ (18)
C++ (14)
C++ (12)
C++ (15)
C++ (15)
Data structure (20)
Data structure (10)
Data structure (10)
Data structure (10)
PERL (25)
VC++ (11)
Oops (30)
Mainframe (41)
Mainframe (15)
Embedded systems (15)
OOAD (49)
Advertisement
▲