Yahoo Web Search

Search results

  1. Learn the various meanings and uses of the word operator, from one who operates a machine or device to a symbol that performs a mathematical or logical operation. See examples, synonyms, etymology, and related phrases of operator.

    • Assignment operator (=) The assignment operator assigns a value to a variable. 1 This statement assigns the integer value 5to the variable x. The assignment operation always takes place from right to left, and never the other way around
    • Arithmetic operators ( +, -, *, /, % ) The five arithmetical operations supported by C++ are: operator. description + addition - subtraction * multiplication / division.
    • Compound assignment (+=, -=, *=, /=, %=, >>=, <<=, &=, ^=, |=) Compound assignment operators modify the current value of a variable by performing an operation on it.
    • Increment and decrement (++, --) Some expression can be shortened even more: the increase operator (++) and the decrease operator (--) increase or reduce by one the value stored in a variable.

    Code sample

    int main () {
      int a, b;
      a = 10;
      b = 4;
      a = b;...
  2. a person who makes something work or puts something into action: a computer / machine operator. An operator is also a person who works on a telephone switchboard:

  3. Learn the meaning of operator in different contexts, such as a person, a company, a symbol, or a skill. Find out how to use operator in sentences and collocations with examples from the Cambridge Dictionary.

    • Overview
    • Conditional ref expression
    • Conditional operator and an if statement
    • Operator overloadability
    • C# language specification
    • See also

    The conditional operator ?:, also known as the ternary conditional operator, evaluates a Boolean expression and returns the result of one of the two expressions, depending on whether the Boolean expression evaluates to true or false, as the following example shows:

    As the preceding example shows, the syntax for the conditional operator is as follows:

    The condition expression must evaluate to true or false. If condition evaluates to true, the consequent expression is evaluated, and its result becomes the result of the operation. If condition evaluates to false, the alternative expression is evaluated, and its result becomes the result of the operation. Only consequent or alternative is evaluated. Conditional expressions are target-typed. That is, if a target type of a conditional expression is known, the types of consequent and alternative must be implicitly convertible to the target type, as the following example shows:

    If a target type of a conditional expression is unknown (for example, when you use the var keyword) or the type of consequent and alternative must be the same or there must be an implicit conversion from one type to the other:

    The conditional operator is right-associative, that is, an expression of the form

    is evaluated as

    A conditional ref expression conditionally returns a variable reference, as the following example shows:

    You can ref assign the result of a conditional ref expression, use it as a reference return or pass it as a ref, out, in, or ref readonly method parameter. You can also assign to the result of a conditional ref expression, as the preceding example shows.

    The syntax for a conditional ref expression is as follows:

    Like the conditional operator, a conditional ref expression evaluates only one of the two expressions: either consequent or alternative.

    Use of the conditional operator instead of an if statement might result in more concise code in cases when you need conditionally to compute a value. The following example demonstrates two ways to classify an integer as negative or nonnegative:

    A user-defined type can't overload the conditional operator.

    For more information, see the Conditional operator section of the C# language specification.

    Specifications for newer features are:

  4. Apr 6, 2024 · Learn about the different types and examples of operators in C language, such as arithmetic, relational, logical, bitwise, assignment and other operators. Operators are symbols that perform operations on operands, which are values or variables.

  5. An operator operates, or controls, something. You could be a radio operator, a heavy machinery operator, or even a telephone operator — or you can be the operator, or manager, of a business. If you start your own dog walking company, you can call yourself an "owner-operator."

  1. People also search for