Question:

What is the use of unary operators in C?

by  |  earlier

0 LIKES UnLike

What is the use of unary operators in C?

 Tags:

   Report

1 ANSWERS


  1. Unary operators are operators that take only a single argument.  Things like the negative operator:  -3, for instance.  The negative sign makes the thing negative.  It is a different operator than the subtraction operator:  2 - 3, for instance.

    You'll use a unary operator pretty much only when it makes sense.  Other examples include ++ (prefix or postfix), -- (ditto), and the casting operators.  In each case, making them binary operators would make no sense.

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.