I heard that if an expression is followed by a semicolon, then it is considered to be an expression statement.
Source: http://farside.ph.utexas.edu/teaching/329/lectures/node11.html
int x = 7;
x = 8;
x++;
x—-;
x = x << 1;
These are all expression statements.
But is this an expression statement too?
return 5;
And if not, then please throughly explain why.
And I would also appreciate it if you could tell whether the return satetement can be considered an expression statement in other languages as well.