One of the recent interview I have been asked to give the output of following program:
Result is : 7 5 7 7.
I couldnt answer correctly but I dont know how it gets to 7 5 7 7, what is the logic does printf flows to print the above values of i.
Code:
void main()
{
int i = 5;
printf(" %d %d %d %d ", ++i,i++,--i,++i);
}
I couldnt answer correctly but I dont know how it gets to 7 5 7 7, what is the logic does printf flows to print the above values of i.
Comment