1,393 views
1 votes
1 votes
#include<stdio.h>
main()
{
    int j=0;
    int i;
    for( i=0;i<100;i++)
    {
        j=j++;
    }
    printf("%d",j);
}

why o/p is zero??

1 Answer

0 votes
0 votes
Every time value of j taht is zero assign to itself j before the increment

j=j++;//at this line zero is  assign first then increment and every time j is assign by zero //

so the final output will be zero

No related questions found