Since i is static , it is already initialized as 0;
for(++i // initialization only once ; ++i//termination condition ; ++i//This will execute later)
So in the 1st print - 2 will be printed.
And in the 2nd print - 4 will be printed.
Thus output is 2 4