The expressions x++;
and x*2;
are reported as illegal. Compiler generates error. However, in case of x+1;
there's no error reported.
Can anyone help me understand why the particular expressions are illegal? Or, in other way, why the addition is legal?
Code:
#include <stdio.h>
int main(void)
{
int x[]={1,2,3,4,5};
x++;
x+1;
x*2;
}