Question: Debug the following code by compiling it for debugging and executing it within a debugger. At which line of code does the program crash? Why

Debug the following code by compiling it for debugging and executing it within a
debugger. At which line of code does the program crash? Why does it crash there?
/* This code has a compile-time error, and at
** least one run-time error. */
#include
#include
main(int argc,char *argv[])
{
int n,i;
int d2,count,
double d1;
while (1)
{
printf("Enter a number (0 to quit): ");
scanf("%d",&n);
if (n ==0)
break;
count=0;
for (i=0; i

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!