Question: I wrote a program in C which crashed when it was run. The following text was copied and pasted directly from a shell window: Program
I wrote a program in C which crashed when it was run. The following text was copied and pasted directly from a shell window:
Program received signal SIGFPE, Arithmetic exception.
xf in zeroint yr yr amt
at mortgage.c:
return amt yr yr;
gdb list
#include
#include
double zerointint yr int yr int amt
return amt yr yr;
the mortgage formula is from page of
gdb
a What is the most likely reason the program stopped?
b What did the user person running the program most likely do wrong? How do you know?
c How should the program be changed to prevent this from happening again?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
