Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP C/HP-UX Reference Manual: Workstations and Servers > Chapter 5 Expressions

Unary Operators

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

You form unary expressions by combining a unary operator with a single operand. All unary operators are of equal precedence and group from right to left.

Syntax

unary-expression ::=
postfix-expression
++ unary-expression
-- unary-expression
unary-operator cast-expression
sizeof unary-expression
sizeof ( type-name )

unary-operator ::= one selected from
& * - ~ ! +

Examples

Title not available (Examples )

The unary plus operator :

+var

The unary minus operator :

-var

The address-of operator :

&var

The indirect operator :

*ptr

The logical NOT operator :

!var

The bitwise NOT operator :

~var

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1996 Hewlett-Packard Development Company, L.P.