PRINT is macro constant. Macro PRINT will be replaced by its defined statement just before the actual compilation starts. Above code is converted as:void main(){
int x=1;
if(x--)
printf("Star Wars");
printf(" Psycho");
else
printf("The Shawshank Redemption");
}
If you are not using opening and closing curly bracket in if clause, then you can write only one statement in the if clause. So compiler will think:
(i)if(x--)
printf("Star Wars");
It is if statement without any else. It is ok.
(ii)printf(" Psycho");
It is a function call. It is also ok
(iii)else
printf("The Shawshank Redemption");
You cannot write else clause without any if clause. It is cause of compilation error. Hence compiler will show an error message: Misplaced else.