Question: please write a c++ code to move aa in w, bb in x, cc in y, and dd in z. Use Ponter to point #include

please write a c++ code to move aa in w, bb in x, cc in y, and dd in z. Use Ponter to point

#include #include using namespace std; /* Do not directly assign w = aa or x = bb ... */ /* Write code to move aa in w, bb in x, cc in y and dd in z */

int main() { unsigned int a = 0xaabbccdd; unsigned char w, x, y, z; ......... return 0; }

I had a basic one you can use

#include

using namespace std;

int main() { unsigned long x = 0x0A0B0C0D; int a = 0x0A0B0C0D; unsigned char* p = (unsigned char*)&a; unsigned short* p1 = (unsigned short*)&x; printf("%X ", *(p)); printf("%02X ", *(p1+1)); return 0; }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!