> Expression in c ~ Online tutorial

Expression in c

Expressions and values


The most common operators in any language are basic arithmetic operators. In C these are the following: function ()  /* provided it returns a sensible value */
+plus (unary)
- minus (force value to be negative)
+ addition
-subtraction
* multiplication
/floating point division
/ integer division "div"
% integer remainder "mod"

These operators would not be useful without a partner operator which could attach the values which they produce to variables. Perhaps the most important operator then is the assignment operator:
=   assignment operator

This has been used extensively up to now.
For example:
double x,y;

x = 2.356;
y = x;
x = x + 2 + 3/5; The assignment operator takes the value of whatever is on the right hand side of the = symbol and puts it into the variable on the left hand side.
As usual there is some standard jargon for this, which is useful to know because compilers tend to use this when handing out error messages.

Please Give Us Your 1 Minute In Sharing This Post!
Please Give Us Your 1 Minute In Sharing This Post!
SOCIALIZE IT →
FOLLOW US →
SHARE IT →
Powered By: BloggerYard.Com

0 comments: