Ch-11 (ICS II) - Decision Constructs
Ch-11 (ICS II) - Decision Constructs
Chapter 11
Decision Constructs
Contents
• Relational Operator & Relational Expression
• Logical Operator & Logical Expression
• Control Structure
• The ‘if’ statement
• The ‘if-else’ Statement
• The Nested ‘if’ Statement
• The ‘if-else-if’ Statement
• The switch Statement
Relational Operator &
Relational Expression
Q.1Define relational operator. How many relational operators are available in C?
Also describe the relational expression.
Relational Operator
• Relational operator symbol used to compare two values of same type
• Result of comparison True (or 1) or False (or 0)
• Used to specify conditions in programs Comparison operators
PM Series
Computer Science
ICS Part-II
by
CM Aslam, Aqsa Aslam, Abdur Rehman &
Mudassir Saleem