-3

I am currently a beginner in C++ and learning about operators.

#include <iostream>

using namespace std;
int main(int argc, char *argv[]) {
    unsigned int a=195;
    unsigned int b=87;
    unsigned int c;
    c=a&b;
    cout << c;
}


The Output of the above program is : 67
This is explanation

But What is the practical use of this?

user1444692
  • 103
  • 3

1 Answers1

2

This is not a boolean operator. It is a binary AND operator. The practical use of this comes from Boolean algebra, which should be studied before any programming attempt is made.

vsoftco
  • 55,410
  • 12
  • 139
  • 252
SergeyA
  • 61,605
  • 5
  • 78
  • 137