Outside class definitions of bitwise c OR operator

Asked By 30 points N/A Posted on -
qa-featured

Hello Techyv Experts,

Please get me prototype examples for outside class definitions of bitwise c OR operator,

Also get me the same for other bitwise operators name with example.

Thanks in Advance,

Araceliariana

SHARE
Answered By 15 points N/A #198635

Outside class definitions of bitwise c OR operator

qa-featured

The Prototype example of Bitwise OR operator for outside class definition is:-
T operator |(const T& a, const T& b);
Other Bitwise operators for outside class definitions are:-
1) Bitwise AND
Example- T operator &(const T& a, const T& b);
2) Bitwise NOT
Example- T operator ~(const T& a);
3) Bitwise XOR
Example- T operator ^(const T& a, const T& b);
4) Bitwise Left Shift
Example- T operator <<(const T& a, const T& b);
5) Bitwise Right Shift
Example- T operator >>(const T& a, const T& b);
Note:- 'T' can be of any data type.

Related Questions