Life is Colourful

Latest News in our day to day in Indian life


Thursday, June 28, 2007

Help to Remove This Bug from My Code

Even if you are a hardcore programmer / software developer, I guarantee you that it would be very difficult for you to work on this code snippet. Simply take it as a challenge to remove the bug from the C program code below :)

/* a simple C program */

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

Labels:



0 Comments:

Post a Comment

<< Home

 
ss_blog_claim=7841434a299aa89b5802eb46d39fbd77