Computer Science, asked by nyasagandhi7, 10 months ago

the symbol & belong to which of the following operators type in C 1)logical 2)arithmetic. 3)bitwise​

Answers

Answered by pratikkumarp061
2

Answer:

& is bitwise operators but && is logical operator. but according to my books it says that & is used as both logical and bitwise operator

Answered by ridhimakh1219
1

The symbol & belongs to bitwise​ operator

Explanation:

Bitwise AND operator(& operator)

  • The symbol, &, represents Bitwise AND operator.
  • The & (bitwise AND) in C programming language accepts two operands as numbers and then perform AND on every single bit of two operands.
  • The output of AND is 1 only when both of the bits are 1 otherwise 0.

C Program to use of bitwise operators  

#include <stdio.h>  

int main()  

{  

   unsigned char a = 5, b = 9;  

   printf("a = %d, b = %d\n", a, b);  

   printf("a&b = %d\n", a & b);  

return 0;  

}

OUTPUT

a = 5, b = 9

a&b = 1

Similar questions