-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnotes.R
More file actions
19 lines (15 loc) · 932 Bytes
/
Copy pathnotes.R
File metadata and controls
19 lines (15 loc) · 932 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# KEY DIFFEFENCES BETWEEN & AND &&
# The & operator is a logical as well as a bitwise operator, as it operates on
# both booleans as well as binary data whereas, the && operator is only a
# logical operator as it operates only on a boolean data type.
# The & operator evaluates both the side of the expression to obtain the final
# result whereas, the && operator evaluates only the left side of the expression
# & if turn out false it doesn't even evaluate the right side of the expression.
# note
# While evaluating the boolean datatype, both the operators result "true" only
# if both the operand are true, else it returns "false".
# conclusion
# The & and && operator, both are used to evaluate the boolean condition
# whereas, the & operator is also used for the bitwise operation. When we
# require to evaluate both the side of the expression the & operator is used
# else we can use && operators