No, that's right.
x++
is a
postincrement operation - it gets the value then increases the source by one and uses teh value it started with.
So
printf("\nThe Increment gives:- %d & %d\n",x++,y++);
Is the equivalent of:
printf("\nThe Increment gives:- %d & %d\n",x,y);
x = x + 1;
y = y + 1;
There is a
preincrement operator if you want to try that instead:
printf("\nThe Increment gives:- %d & %d\n",++x,++y);
That is the equivalent of:
x = x + 1;
y = y + 1;
printf("\nThe Increment gives:- %d & %d\n",x,y);
Which might be what yopu were expecting.