i=i++ This modifies the variable i twice with no sequence point in between. That is not allowed so your program will have undefined behaviour which means that anything could happen.
It's undefined, thus the result depends on the implementation of your compiler.
i++, or post-increment, increments the variable but returns the old value (before incrementing).
An example:
1 2
int i = 5, j = 10;
j = i++;
j will now be 5 (equal to old value of i), while i becomes 6.
It should now be obvious why i = i++; can only lead to problems.
i think you don't understand "undefined." The term doesn't mean that the output will always be erroneous. There is simply no guarantee of what will happen. Consider delete [] p; How does the compiler know how much to delete; you never specified. Well there's a particular implementation that stores the total number of elements/space/size taken by vector p in address just before the start of &p[0]. Now you can use this information and send p to a function without specifying it's size as another parameter and get away with it. This however doesn't mean you are doing it right. Undefined can be implementation specific too.
#include<iostream.h>
#include<conio.h>
void main()
{ clrscr();
int i;
for(i=0;i<10;i++)
{
cout<<"\t"<<i;
}
getch();
}
//you r missing symbol { that's by your program always show zero ... plz see my programm