php hit counter

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
we used single & and single | logical operator in condition
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support
#1
sir can we used single & and single | logical operator in condition if yes then what is difference of double && and double ||?
Reply
#2
Dear Student,
In C/C++ programming, & is different from &&. As && is boolean AND operator which is used to evaluate complex conditiond where as & operator is different from the && operator and it is address operator. Topic related to address operator (&) will be discussed in coming lectures.
both | and || are different from each other. || is the correct boolean OR operator but | is wrong.

Difference between && OPERATOR and || OPERATOR

The operator && corresponds to Boolean logical operation AND. This operation results true if both its two operands are true, and false otherwise. whereas the operator || corresponds to Boolean logical operation OR. This operation results true if either one of its two operands is true, thus being false only when both operands are false themselves.


Hopefully, everything is clear to you now.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  we will apply single rotation and which will apply double rotation?2012 Vuhelper 0 1,976 01-04-2012, 10:29 PM
Last Post: Vuhelper
  explain this operator -> which is use as headnode->stnext(null); Vuhelper 0 1,761 01-04-2012, 10:26 PM
Last Post: Vuhelper
  Overloaded >> operator not reading more than first line from data file in c++ 2011 Vuhelper 0 952 07-23-2011, 05:38 PM
Last Post: Vuhelper
  Consitional Operator in C++ July 2011 Vuhelper 0 880 07-12-2011, 11:02 PM
Last Post: Vuhelper
  arithmetical operator in c++ may 2011 Vuhelper 0 1,770 05-29-2011, 06:18 PM
Last Post: Vuhelper
  cascading operator overloading in c++ 2011 saneha 1 3,005 05-02-2011, 05:08 PM
Last Post: Vuhelper
  is the dot operator connect the class object and a member of that class? saneha 1 2,775 05-02-2011, 06:41 AM
Last Post: Vuhelper
  how the information hidden within an object can be assessed either dot operator conne saneha 1 2,793 05-02-2011, 06:37 AM
Last Post: Vuhelper
  Member access specifier is a C++ Operator saneha 0 2,505 05-02-2011, 06:34 AM
Last Post: saneha

Forum Jump:


Users browsing this thread: 1 Guest(s)
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support