Basic and Advance C Question:

Download Job Interview Questions and Answers PDF

How can I handle floating-point exceptions gracefully?

C Programming Interview Question
C Programming Interview Question

Answer:

On many systems, you can define a function matherr which will be called when there are certain floating-point errors, such as errors in the math routines in <math.h>. You may also be able to use signal to catch SIGFPE

Download C Programming Interview Questions And Answers PDF

Previous QuestionNext Question
How can I ensure that integer arithmetic doesnt overflow?How can I trap or ignore keyboard interrupts like control-C?