e-Nagar

November 22, 2007

Can u get rid of this bug in the code below?

Filed under: Humor — Ankur Aggarwal @ 11:46 pm

/* add.c
* 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;
}

Forwarded by Savitha

Theme: Silver is the New Black. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 36 other followers