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
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
Get step-by-step solutions from verified subject matter experts
