#27 – Expressions, Operators and Operands

Expressions are sequences of operators and operands.  Evaluating an expression results in a single value for the entire expression.

Operators are the symbols used in expressions, indicating what operations apply to the operands in the expression.

Operands are the values acted upon by the operators, e.g. literals, results of function calls, other expressions.

There are three kinds of operators:

  • Unary – Takes one operand.  E.g.  x++
  • Binary – Takes two operands.  E.g.  x+y
  • Ternary – Takes three operands (the conditional operator).  E.g.  e ? x : y



About Sean
Software developer in the Twin Cities area, passionate about software development and sailing.

2 Responses to #27 – Expressions, Operators and Operands

  1. Pingback: Tweets that mention #27 – Expressions, Operators and Operands « 2,000 Things You Should Know About C# -- Topsy.com

  2. Pingback: #1,071 – The Unary Minus Operator | 2,000 Things You Should Know About C#

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: