Explain the unary minus operator, C/C++ Programming

Assignment Help:

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

 


Related Discussions:- Explain the unary minus operator

Tree, Write algorithm and program for the conversion of a Tree to a Binary ...

Write algorithm and program for the conversion of a Tree to a Binary Tree

Prime, Prepare a program to obtain prime factors of any integer number usin...

Prepare a program to obtain prime factors of any integer number using functions

Area under curve, Write a program to find the area under the curve y = f(x)...

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b

Explain difference between early binding and late binding, What is the diff...

What is the difference between early binding and late binding? What are advantages of early binding? a.) Late binding refers to function calls which aren't resolved until run t

I want packet capture analysis, I want Packet capture analysis Project D...

I want Packet capture analysis Project Description: Need assistance in debugging some packet capture Skills required is C Programming

201 it, overloadstream insertion opertator to display the data of object on...

overloadstream insertion opertator to display the data of object on the console

Explain the bit wise operations, Explain the Bit Wise Operations? C lan...

Explain the Bit Wise Operations? C language in particular was created to make it easier to write operating systems. The objective was to have a language that provided excellent

Prime no., program to find if a no . is prime or not

program to find if a no . is prime or not

Define external static storage class - computer programming, Define Externa...

Define External Static Storage Class - Computer Programming? An external static is declared outside of all the functions and is obtainable to all functions in that program. The

Memory allocation for objects, when a class is defined the compiler will no...

when a class is defined the compiler will not allocate memory. This is true only for data member not for member function.  As soon as the member function is defined  the require

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd