In the following code segment, I was expecting the answer to be 5 but it shows compile time error:
#include <stdio.h>
int main()
{
int i = 4;
printf("%d", (++i)++);
return 0;
}
What is the reason?. Here ++i
returns an l value right So we could increment it right?