unary minus operator negationthis operand can be


Unary Minus Operator( Negation)

This operand can be used to negate the value of a variable. It is also used to state a negative number, here a minus(-) sign is prefixed to the number.

e.g.

                int x = 5;

                int z = -10;

                                y = -x;

                                a = z;

The value of y now becomes -5 and 'a' becomes -10.

Though, the language does not offer any unary + operator

 

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: unary minus operator negationthis operand can be
Reference No:- TGS0309236

Expected delivery within 24 Hours