.:!:. குறிஞ்சி மலர் - Kurinji Malar .:!:.

"கற்போம் கற்பிப்போம்.. கல்வியின் சிறப்பு கரும்பின் இனிப்பு" - சான்றோர்

Software Testing - Funny

As you are a Software engineer,
Remove this bug from the 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;
}



Solution
************************************************************************

And the developer fixes it this way &gt;&gt;

::
::

::
::

::
::

::
:: 

::
::

::
::

::
::

::
::

::
::

::
::

::
::

::
::

::
::

::
::

::
::

::
:: 

::
::

::
::

::
::

::
::

::
::

::
::

::
::

::
::

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

















0 comments:

Post a Comment

Page Hitz

My Another Blog

My Another Blog
Maha Chudar - My Another random flavours blog about Information Technology and Indian Art & Culture

குறிஞ்சி மலர்

குறிஞ்சி மலர்

Search Here..

My Followers

FACEBOOK

About Me

My photo
Lawspet, Puducherry, India
Completed MSc Computer Science (2008-2010) at Pondicherry University. Now Working as Smart Card PC/SC Appliction Developer in Pondicherry.

Find Me in FaceScraps

Follow Me At Face Scraps Social Network

Popular Posts

Facebook Like:

World Famous

free counters

Traffic

Revolver Maps