2
Operators and Expressions
Learning Objectives
In this chapter, you will learn about:
Operands and operators
Expressions
Simple expressions and compound expressions
How compound expressions are evaluated
Precedence and associativity of operators
How operators are classified
Classification based on number of operands
Unary, binary and ternary operators
Classification based on role of operator
Arithmetic, relational, logical, bitwise, assignment and miscellaneous operators
Rules for evaluation of arithmetic expressions
Implicit and explicit-type conversions
Promotions and demotions
Conditional, comma, sizeof and address-of operator
Combined precedence of all operators
2.1 Introduction
In Chapter 1, you have learnt about identifiers (i.e. ...
Get Programming in C: A Practical Approach, First Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.