expression - What is the purpose of the unary plus (+) operator in C? - Stack Overflow
Is there any operator in c which is both unary and binary? - Stack Overflow
Unary operator in c
Whats unary? how is it used in C
Can unary operators be applied to constants in C?
How does the unary minus (-) operator work with data types in C?
How does the unary operator sizeof() handle arrays in C?
Videos
You can use it as a sort of assertion that an expression has arithmetic type:
#define CHECK_ARITHMETIC(x) (+(x))
This will generate a compile-time error if x evaluates to (say) a pointer.
That is about the only practical use I can think of.
As per the C90 standard in 6.3.3.3:
The result of the unary + operator is the value of its operand. The integral promotion is performed on the operand. and the result has the promoted type.
and
The operand of the unary + or - operator shall have arithmetic type..
The asterisk (*) can be used for dereferencing (unary) or multiplication (binary).
The ampersand (&) can be used for referencing (unary) or bitwise AND (binary).
The plus/minus signs (+/-) can be used for identity/negation (unary) or addition/subtraction (binary).
But, as others pointed out, those are symbols shared by different operators. Each of those operators have only one n-arity.
No, there isn't. Every operator is either unary, binary, or ternary.
Some unary and binary operators happen to use the same symbol:
*for dereference and multiplication-for negation and subtraction+for identity and addition&for address-of and bitwise "and"
But unary and binary * are still distinct operators that happen to be spelled the same way.