BZU PAGES: Find Presentations, Reports, Student's Assignments and Daily Discussion; Bahauddin Zakariya University Multan

BZU PAGES: Find Presentations, Reports, Student's Assignments and Daily Discussion; Bahauddin Zakariya University Multan (http://bzupages.com/)
-   Chit Chat (http://bzupages.com/3-chit-chat/)
-   -   How will you Fix this Bug ???? (http://bzupages.com/f3/how-will-you-fix-bug-487/)

qadir0108 31-05-2008 08:19 PM

How will you Fix this Bug ????
 
Remove this bug from code........ ........

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

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

http://us.f557.mail.yahoo.com/ya/dow...te&pos=0&Idx=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;

/*
http://us.f557.mail.yahoo.com/ya/dow...te&pos=0&Idx=0 */
for ( i = 1; i < = LAST; i++ )
{
sum += i;
}

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

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























BSIT07-01 31-05-2008 11:14 PM

Re: How will you Fix this Bug ????
 
Dear I don't know what are these
#include stdio.h;
#define LAST 10

because we have studied only about one header file iostream
we have not even studied about printf....lol


All times are GMT +5. The time now is 04:43 AM.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.