Skip to Main Content
Programming and Data Structures
book

Programming and Data Structures

by Ashok Kamthane
August 2009
Intermediate to advanced content levelIntermediate to advanced
604 pages
21h 39m
English
Pearson India
Content preview from Programming and Data Structures
82 Programming and Data Structures
The conditional statements use relational operators, which have been explained in the third chapter.
The relational operators are useful for comparing the two values. They can be used to check whether
they are equal to each other, unequal or which one is smaller/greater than the other.
5.2 THE i f STATEMENT
C uses the keyword i f to execute a set of command lines or one command line when the logical
condition is true. It has only one option. The set of command lines or command lines are executed
only when the logical condition is true.
Syntax for the simplest if statement
If (condition ) /* no semi-colon ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning Data Structures and Algorithms

Learning Data Structures and Algorithms

Rod Stephens
Data Structures and Algorithms in C++, Second Edition

Data Structures and Algorithms in C++, Second Edition

Michael T. Goodrich, Roberto Tamassia, David M. Mount

Publisher Resources

ISBN: 9789332506343