Logical operators are used to connect multiple conditions within a if..else.. statement. The different types of Logical operators are as follows:
- AND Operator: &&:
- OR Operator: ||
- NOT Operator: !
Working of the Logical operators may be explained in the following way.
If two conditions are connected by a AND (&&) Operator: i.e.
if ( condition 1 && condition 2 )
Then, the statement is executed, only when both condition 1 and condition 2 are TRUE
If two conditions are connected by an OR (||) Operator: i.e.
if ( condition 1 || condition 2 )
Then, the statement is executed, when any one of the conditions is TRUE
About our authors: Team EQA
You have viewed 1 page out of 248. Your C learning is 0.00% complete. Login to check your learning progress.
Questions index C Questions C++ Questions Win32 MFC COM/DCOM DLL Questions
Compilers & Editors
Download Visual Studio Download XCode Download Visual Studio Code Android studio install sdk Eclipse installer Best C compilers IDEs
Development system setup
Windows media creation tool MSDN subscription Ubuntu virtualbox
New updated posts
Why learn C? Draw on printer Memory leaks