Answers for "& operator in c"

C++
4

c++ .* operator

The .* operator is used to dereference pointers to class members.
Posted by: Guest on September-03-2020
0

c &= operator

// & is the binary "and" operator
// a &= b is equivalent to a = a&b
Posted by: Guest on September-08-2021
0

c |= operator

// | is the binary "or" operator
// a |= b is equivalent to a = a|b

#include <stdio.h>

int main() {
   int a = 10;  // 00001010 in binary
   int b = 6;   // 00000110 in binary

   printf("Result : %dn", a |= b);
   // Result is 14 which is OOOO111O in binary

   return 0;
}
Posted by: Guest on September-08-2021

Browse Popular Code Answers by Language