Welcome, %1$s. Please login or register.

October 21, 2017, 03:58:12 PM
: 1
: How will you Fix the bug ???  ( 3963 )
« : March 31, 2010, 11:52:29 AM From Neha»



How will you Fix the bug ???


Remove this bug from code................



##########################################################
#include <stdio.h >
#define LAST 10

int main()
{
int i, sum = 0;

for ( i = 1; i < = LAST; i++ )
{
sum += i;
}

/*-for-*/
printf("sum = %d\n", sum);
return 0;
}

##########################################################

And the developer fixes it this way
..
..
..
..
..
..
..
..
...
..
..
..
..
..
..
..
..
..
..
..

..
..

..

..

..

......

..

......

..

..

..

..

....

..

 

 

 

 

 

 

 

 

 

##########################################################
#include stdio.h;
#define LAST 10

int main()
{
int i, sum = 0;
/*
*/
for ( i = 1; i < = LAST; i++ )
{
sum += i;
}

/*-for-*/
printf("sum = %d\n", sum);
return 0;
}  

##########################################################





 
Liked It? Share it!

              


: 1
« previous next »

 

Best RatedList All>>



Latest
Random



SMF 2.0.10 | SMF © 2015, Simple Machines | Contact Webmaster | OnlineFunDb.com © 2009/10 | Legal Disclaimer