How are arithmetic expression evaluated in The C language? How can I understand the Operator priority?
+16
A:
I think this table can help you.
BTW, have you ever heard of Google?
Also, this answer might be of interest.
klez
2010-07-18 16:23:33
+3
A:
This Wikipedia entry might help: http://en.wikipedia.org/wiki/Operators_in_C_and_C%2B%2B
As a side-note: the term "operator precedence" is used more commonly than "operator priority" and might lead to more useful search hits in your favorite search engine.
Greg S
2010-07-18 16:24:16
"favorite search engine" which is not google i guess. Google returns precedence for priority.
Praveen S
2010-07-18 16:30:51
@Praveen: for what it's worth, the C standard uses "operator precedence".
Greg S
2010-07-18 16:32:58
@Greg S: Yeah that's rite. It was for the one who asked the question. Wonder why it isn't closed yet.
Praveen S
2010-07-18 16:41:58
@Praveen because it is indeed a question, it isn't subjective and argumentative and it isn't off-topic. It's just trivial.
klez
2010-07-18 16:45:57
+1
A:
The wikipedia page that Greg S linked to is a good reference.
More generally, any time you have questions about the C language, you can always read the standard. It's generally pretty well written and clear; once you've skimmed through it, you'll know where to find answers to questions as they come up.
Stephen Canon
2010-07-18 16:29:16
Brian Hooper
2010-07-18 16:42:11
Stephen Canon
2010-07-18 18:12:06
Good point. It doesn't seem so very long ago that C was the Latest Thing.
Brian Hooper
2010-07-19 01:08:40