In C, it\'s legal to write something like:
int foo = +4;
However, as far as I can tell, the unary plus (+) in +4
The unary + operator does only one thing: it applies the integer promotions. Since those would occur anyway if the operand were used in an expression, one imagines that unary + is in C simply for symmetry with unary -.
It's difficult to see this in action because the promotions are so generally applied.
I came up with this:
printf("%zd\n", sizeof( (char) 'x'));
printf("%zd\n", sizeof(+(char) 'x'));
which (on my Mac) prints
1
4