Answer to Question #22375 in C++ for emmanuel

Question #22375
if a= 0X7406 and b= 0x9B2E find a|b , a$b , a^b
1
Expert's answer
2013-01-18T08:51:05-0500
#include <conio.h>
#include <iostream>

using namespace std;

void main()
{
int a = 0x7406;
int b = 0x9B2E;

cout << "a = " << hex << a << endl;
cout << "b = " << hex << b << endl << endl;

cout << "a | b = " << hex << (a | b) << endl;
cout << "a & b = " << hex << (a & b) << endl;
cout << "a ^ b = " << hex << (a ^ b) << endl;
getch();
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS