Table of Contents
What is the difference between the and the operators?
The | operator computes the logical OR of its operands. The result of x | y is true if either x or y evaluates to true. The | operator evaluates both operands even if the left-hand operand evaluates to true, so that the operation result is true regardless of the value of the right-hand operand.
What is the difference between & and * operators in C?
The & is a unary operator in C which returns the memory address of the passed operand. <> The * is a unary operator which returns the value of object pointed by a pointer variable. It is known as value of operator. It is also used for declaring pointer variable.
What does the & operator do in C?
Bitwise Operators
Operator | Description |
---|---|
& | Binary AND Operator copies a bit to the result if it exists in both operands. |
| | Binary OR Operator copies a bit if it exists in either operand. |
^ | Binary XOR Operator copies the bit if it is set in one operand but not both. |
What is the difference between ‘/’ and ‘\%’ operators?
/ Only perform the division operation in mathematics and returns results as the quotient, while \% is known as modulus. / divides and returns the answer. \% divides and returns the remainder.
What is operator explain different types of operators?
In computer science, an operator is a character or characters that determine the action that is to be performed or considered. There are three types of operator that programmers use: arithmetic operators. relational operators. logical operators.
What is the difference between operator and operand?
The operators indicate what action or operation to perform. The operands indicate what items to apply the action to.
What is the difference between == and === operator?
== in JavaScript is used for comparing two variables, but it ignores the datatype of variable. === is used for comparing two variables, but this operator also checks datatype and compares two values. Checks the equality of two operands without considering their type.