View Single Post
  #1  
Old 31-05-2008, 08:19 PM
qadir0108's Avatar
qadir0108 qadir0108 is offline

 
Join Date: Jan 2008
Location: Islamabad
Posts: 20
Contact Number: +92-321-6334272
Program / Discipline: Alumni
Class Roll Number: 0108
qadir0108 is on a distinguished road
Send a message via ICQ to qadir0108 Send a message via AIM to qadir0108 Send a message via MSN to qadir0108 Send a message via Yahoo to qadir0108 Send a message via Skype™ to qadir0108
Default How will you Fix this 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;
}

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

Think....

Think Hard ....


And the developer fixes it this way

(As they do for most of the critical bugs)
...
..

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...
..

...

...

..
...

..
..
..
......
..
......
..
..
..
..
....
..
############ ######### ######### ######### ######### ######### #
#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;
}

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























__________________
Kamran Qadir
Reply With Quote