answersLogoWhite

0


Best Answer

Fatal errors are errors or exceptions that cause a program to abort. You solve fatal errors by examining the source code to determine what is causing the error. If the error is an exception, it can be caught. That is precisely why we always place a catch-all exception handler in the main function. Once we know where the exception was raised we can write code to specifically deal with that exception -- at or near the point it was actually raised.

However, not all fatal errors throw exceptions. For example, a divide by zero operation is a fatal error because your program has allowed the system to attempt an illegal operation for which there is no reasonable means of recovery. The only solution is to avoid invoking illegal operations; test your assumptions and always assert that all operands are within the acceptable range of the operator.

Fatal errors can also be caused by hardware failure, such as bad RAM, which is beyond the remit of applications programmers.

User Avatar

Wiki User

7y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you solve fatal error in c program?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you solve error c plus plus ntvdm CPU illegal?

Use the debugger to locate the error.


Write a c program to solve cos series?

Please do.


How to solve bgi error Graphics not initialised in C?

to install the graphics driver


How do you get Linux program error in void main in c?

This question cannot be answered without seeing the source program.


Missing semicolon in c program is a compile time error?

It's a syntax error, which is detected during compilation, yes.


Write a C program that takes a binary file as input and finds error check using different mechanisms?

write a c program that takes a binary file as input and finds error check using different mechanisms.


What is logic error in c plus plus?

A logic error is an error that will not cause the program to crash, but will nevertheless cause the program to behave in a way that is unexpected or otherwise incorrect. By way of example, a program that converts Fahrenheit to Celsius will behave incorrectly if the program is written to multiply and divide first instead of adding or subtracting first (F-32*5/9=C instead of (F-32)*5/9=C). In this case, simply forgetting the enclosing parentheses caused the logic error.


What kind of an error in c plus plus is dividing by zero?

The answer is in your own question. A divide by zero error is a divide or mod by zero type of error. In MSVC++ it has the error code C2124. Ultimately it is a fatal error and will either produce a compile time error or throw an unhandled exception at runtime.


How do you solve this error under-fined symbol 'cin'in c plus plus?

#include <iostream> using namespace std;


You have developed a rabbit ftp server program in dynamic c whenever you tried to dowload a file from server program you are getting the error as input string is not in the correct format?

it may b the error in lib files


What is java program made of?

basic unit of C is structure like procedure ,syntax's, error's compiler etc


How you can solve the program of temperature in Celsius and convert it into farennite?

This has been answered twice recently: F=1.8 C + 32