Home > Back-end >  Validate this what mean ah, thank you
Validate this what mean ah, thank you

Time:06-05

CodePudding user response:

Sure is like this? Can be used to test the program

CodePudding user response:

 
#include
#include

The union TestType
{
Char mChar [4].
Int mInt;
};
Int main ()
{
TestType test;

Test. MChar [3]='F';
Test. MChar [2]='A';
='T' test. MChar [1];
Test. MChar [0]='E';

Char t=static_cast & lt; char> (test. MInt);

Printf (" % % % % c, c, c, c/n ", the test. The mChar [3], the test. The mChar [2], the test. The mChar [1], the test. The mChar [0]).
Printf (" % % % % c, c, c, c/n ", (test. MInt> 24) % 256, (test. MInt> 16) % 256, (test. MInt> 8) % 256, test. MInt % 256);
Printf (" % \ n "c, t);
}

CodePudding user response:

I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10581430.html
I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10768339.html
  • Related