#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

More

About Sean
Software developer in the Twin Cities area, passionate about .NET technologies. Equally passionate about my own personal projects related to family history and preservation of family stories and photos.

One Response 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

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

Follow

Get every new post delivered to your Inbox.

Join 43 other followers