Exportar (0) Imprimir
Expandir todo
EN
Este contenido no se encuentra disponible en su idioma, pero aquí tiene la versión en inglés.
Personas que lo han encontrado útil: 0 de 1 - Valorar este tema

Expressions with Unary Operators

Unary operators act on only one operand in an expression. The unary operators are:

These operators have right-to-left associativity. Unary expressions generally involve syntax that precedes a postfix or primary expression.

The following are the possible forms of unary expressions:


        postfix-expression
++unary-expression
––unary-expression
unary-operator cast-expression
sizeof .unary-expression
sizeof ( type-name )
allocation-expression
deallocation-expression

The unary-operator may be one of


        * & + – ! ~

Any postfix expression is considered a unary expression, and since any primary expression is considered a postfix expression, all primary expressions are considered unary expressions as well. For more information, see Postfix Expressions and Primary Expressions.

The allocation-expression refers to the new operator. The deallocation-expression refers to the delete operator. See the links above.

The cast-expression is a unary expression with an optional cast to alter the type. For more information see Cast Operator: ().

¿Te ha resultado útil?
(Caracteres restantes: 1500)
Gracias por sus comentarios

Adiciones de comunidad

AGREGAR
Mostrar:
© 2014 Microsoft. Reservados todos los derechos.