Quick actions

cmd+k|ctrl+k

Navigation

Languages

Bit operators / & - bitwise AND / Essential C++

Snippet info

Language

Cpp

Visibility

public

Author

kkowalczyk

Created

2019-03-27T06:44:08Z

Updated

2019-03-27T06:44:08Z

#include <iostream>

int main(int argc, char **argv) {
    int a = 5;  // 0101b  (0x05)
    a &= 10;    // a = 0101b & 1010b == 0

    std::cout << "a = " << a << std::endl;
}
INFO